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

· 10년 전 · 1457

<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,500
10년 전 조회 1,399
10년 전 조회 1,362
10년 전 조회 1,368
10년 전 조회 1,391
10년 전 조회 1,438
10년 전 조회 1,366
10년 전 조회 1,584
10년 전 조회 1,733
10년 전 조회 1,641
10년 전 조회 1,410
10년 전 조회 1,403
10년 전 조회 1,359
10년 전 조회 1,355
10년 전 조회 1,461
10년 전 조회 1,371
10년 전 조회 1,328
10년 전 조회 1,395
10년 전 조회 1,735
10년 전 조회 2,209
10년 전 조회 1,768
10년 전 조회 1,572
10년 전 조회 1,442
10년 전 조회 1,410
10년 전 조회 1,428
10년 전 조회 1,385
10년 전 조회 1,407
10년 전 조회 1,422
10년 전 조회 1,594
10년 전 조회 1,480
10년 전 조회 2,224
10년 전 조회 1,770
10년 전 조회 1,505
10년 전 조회 1,596
10년 전 조회 1,821
10년 전 조회 1,497
10년 전 조회 1,703
10년 전 조회 1,537
10년 전 조회 1,655
10년 전 조회 1,492
10년 전 조회 1,451
10년 전 조회 1,448
10년 전 조회 1,494
10년 전 조회 1,484
10년 전 조회 1,527
10년 전 조회 1,546
10년 전 조회 1,526
10년 전 조회 1,663
10년 전 조회 1,661
10년 전 조회 1,458
10년 전 조회 1,768
10년 전 조회 2,091
10년 전 조회 1,553
10년 전 조회 1,805
10년 전 조회 1,773
10년 전 조회 1,620
10년 전 조회 1,598
10년 전 조회 1,540
10년 전 조회 1,652
10년 전 조회 1,399
10년 전 조회 1,474
10년 전 조회 1,690
10년 전 조회 1,513
10년 전 조회 1,477
10년 전 조회 1,463
10년 전 조회 1,487
10년 전 조회 1,499
10년 전 조회 1,488
10년 전 조회 1,515
10년 전 조회 1,472
10년 전 조회 1,632
10년 전 조회 1,456
10년 전 조회 1,475
10년 전 조회 1,584
10년 전 조회 2,278
10년 전 조회 1,531
10년 전 조회 1,503
10년 전 조회 1,590
10년 전 조회 1,496
10년 전 조회 1,683
10년 전 조회 1,588
10년 전 조회 1,497
10년 전 조회 1,495
10년 전 조회 1,532
10년 전 조회 1,527
10년 전 조회 1,463
10년 전 조회 1,413
10년 전 조회 1,397
10년 전 조회 1,440
10년 전 조회 1,838
10년 전 조회 1,460
10년 전 조회 1,557
10년 전 조회 1,504
10년 전 조회 1,739
10년 전 조회 1,560
10년 전 조회 1,477
10년 전 조회 1,505
10년 전 조회 1,539
10년 전 조회 1,663
10년 전 조회 1,592