모바일 OS에서 자바스크립트 select() 구현하기 입니다.

· 10년 전 · 1339

<textarea id="idText">
Hello Apple!
Hello Android!
</textarea>

<script language="javascript" type="text/javascript">
var Mobile="";
var sUsrAgt=navigator.userAgent;

if((/iPhone/i.test(sUsrAgt)) || (/iPod/i.test(sUsrAgt))) Mobile="IP";
else if((/series60/i.test(sUsrAgt)) || (/symbian/i.test(sUsrAgt))) Mobile="SY";
else if(/iPad/i.test(sUsrAgt)) Mobile="IA";
else if(/android/i.test(sUsrAgt)) Mobile="AN";
else if(/windows ce/i.test(sUsrAgt)) Mobile="WM";
else if(/blackberry/i.test(sUsrAgt)) Mobile="BB";
else if(/palm/i.test(sUsrAgt)) Mobile="PM";
else if(/Kindle/i.test(sUsrAgt)) Mobile="KD";

var oTextArea=document.getElementById("idText");

function selectMobile() {
oTextArea.setSelectionRange(0, 9999);
}

function selectAll()
{
if (Mobile) {
oTextArea.focus();
setTimeout("selectMobile()",1234);
}
else {
oTextArea.select();
}
}

selectAll();

</script>

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
10년 전 조회 1,285
10년 전 조회 1,239
10년 전 조회 1,270
10년 전 조회 1,279
10년 전 조회 1,328
10년 전 조회 1,258
10년 전 조회 1,486
10년 전 조회 1,626
10년 전 조회 1,529
10년 전 조회 1,294
10년 전 조회 1,286
10년 전 조회 1,251
10년 전 조회 1,244
10년 전 조회 1,369
10년 전 조회 1,286
10년 전 조회 1,235
10년 전 조회 1,286
10년 전 조회 1,635
10년 전 조회 2,107
10년 전 조회 1,673
10년 전 조회 1,503
10년 전 조회 1,472
10년 전 조회 1,316
10년 전 조회 1,300
10년 전 조회 1,322
10년 전 조회 1,279
10년 전 조회 1,293
10년 전 조회 1,319
10년 전 조회 1,483
10년 전 조회 1,381
10년 전 조회 2,113
10년 전 조회 1,646
10년 전 조회 1,394
10년 전 조회 1,482
10년 전 조회 1,718
10년 전 조회 1,400
10년 전 조회 1,585
10년 전 조회 1,411
10년 전 조회 1,535
10년 전 조회 1,376
10년 전 조회 1,339
10년 전 조회 1,350
10년 전 조회 1,382
10년 전 조회 1,375
10년 전 조회 1,407
10년 전 조회 1,437
10년 전 조회 1,405
10년 전 조회 1,561
10년 전 조회 1,549
10년 전 조회 1,340
10년 전 조회 1,647
10년 전 조회 1,990
10년 전 조회 1,444
10년 전 조회 1,695
10년 전 조회 1,658
10년 전 조회 1,516
10년 전 조회 1,462
10년 전 조회 1,431
10년 전 조회 1,538
10년 전 조회 1,271
10년 전 조회 1,364
10년 전 조회 1,589
10년 전 조회 1,406
10년 전 조회 1,400
10년 전 조회 1,348
10년 전 조회 1,391
10년 전 조회 1,373
10년 전 조회 1,381
10년 전 조회 1,409
10년 전 조회 1,354
10년 전 조회 1,518
10년 전 조회 1,341
10년 전 조회 1,357
10년 전 조회 1,448
10년 전 조회 2,174
10년 전 조회 1,416
10년 전 조회 1,399
10년 전 조회 1,474
10년 전 조회 1,391
10년 전 조회 1,586
10년 전 조회 1,482
10년 전 조회 1,402
10년 전 조회 1,403
10년 전 조회 1,449
10년 전 조회 1,426
10년 전 조회 1,348
10년 전 조회 1,307
10년 전 조회 1,284
10년 전 조회 1,318
10년 전 조회 1,708
10년 전 조회 1,338
10년 전 조회 1,456
10년 전 조회 1,402
10년 전 조회 1,633
10년 전 조회 1,437
10년 전 조회 1,378
10년 전 조회 1,389
10년 전 조회 1,420
10년 전 조회 1,544
10년 전 조회 1,487