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

· 10년 전 · 1439

<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,482
10년 전 조회 1,380
10년 전 조회 1,337
10년 전 조회 1,352
10년 전 조회 1,365
10년 전 조회 1,427
10년 전 조회 1,349
10년 전 조회 1,563
10년 전 조회 1,715
10년 전 조회 1,629
10년 전 조회 1,385
10년 전 조회 1,388
10년 전 조회 1,345
10년 전 조회 1,331
10년 전 조회 1,445
10년 전 조회 1,360
10년 전 조회 1,320
10년 전 조회 1,381
10년 전 조회 1,719
10년 전 조회 2,193
10년 전 조회 1,760
10년 전 조회 1,559
10년 전 조회 1,424
10년 전 조회 1,399
10년 전 조회 1,415
10년 전 조회 1,373
10년 전 조회 1,396
10년 전 조회 1,411
10년 전 조회 1,579
10년 전 조회 1,464
10년 전 조회 2,202
10년 전 조회 1,750
10년 전 조회 1,483
10년 전 조회 1,578
10년 전 조회 1,809
10년 전 조회 1,484
10년 전 조회 1,688
10년 전 조회 1,521
10년 전 조회 1,629
10년 전 조회 1,472
10년 전 조회 1,436
10년 전 조회 1,430
10년 전 조회 1,477
10년 전 조회 1,469
10년 전 조회 1,510
10년 전 조회 1,532
10년 전 조회 1,501
10년 전 조회 1,648
10년 전 조회 1,639
10년 전 조회 1,440
10년 전 조회 1,756
10년 전 조회 2,076
10년 전 조회 1,540
10년 전 조회 1,787
10년 전 조회 1,753
10년 전 조회 1,599
10년 전 조회 1,582
10년 전 조회 1,528
10년 전 조회 1,632
10년 전 조회 1,379
10년 전 조회 1,456
10년 전 조회 1,670
10년 전 조회 1,496
10년 전 조회 1,467
10년 전 조회 1,446
10년 전 조회 1,469
10년 전 조회 1,481
10년 전 조회 1,474
10년 전 조회 1,500
10년 전 조회 1,452
10년 전 조회 1,620
10년 전 조회 1,442
10년 전 조회 1,453
10년 전 조회 1,565
10년 전 조회 2,271
10년 전 조회 1,520
10년 전 조회 1,490
10년 전 조회 1,578
10년 전 조회 1,487
10년 전 조회 1,668
10년 전 조회 1,576
10년 전 조회 1,489
10년 전 조회 1,487
10년 전 조회 1,517
10년 전 조회 1,512
10년 전 조회 1,447
10년 전 조회 1,399
10년 전 조회 1,382
10년 전 조회 1,419
10년 전 조회 1,824
10년 전 조회 1,444
10년 전 조회 1,543
10년 전 조회 1,491
10년 전 조회 1,731
10년 전 조회 1,545
10년 전 조회 1,458
10년 전 조회 1,490
10년 전 조회 1,529
10년 전 조회 1,649
10년 전 조회 1,569