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

· 10년 전 · 1355

<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,421
10년 전 조회 1,294
10년 전 조회 1,255
10년 전 조회 1,287
10년 전 조회 1,298
10년 전 조회 1,345
10년 전 조회 1,270
10년 전 조회 1,501
10년 전 조회 1,638
10년 전 조회 1,547
10년 전 조회 1,309
10년 전 조회 1,300
10년 전 조회 1,265
10년 전 조회 1,257
10년 전 조회 1,381
10년 전 조회 1,299
10년 전 조회 1,254
10년 전 조회 1,304
10년 전 조회 1,645
10년 전 조회 2,121
10년 전 조회 1,687
10년 전 조회 1,482
10년 전 조회 1,340
10년 전 조회 1,312
10년 전 조회 1,337
10년 전 조회 1,292
10년 전 조회 1,309
10년 전 조회 1,333
10년 전 조회 1,496
10년 전 조회 1,396
10년 전 조회 2,131
10년 전 조회 1,657
10년 전 조회 1,406
10년 전 조회 1,501
10년 전 조회 1,731
10년 전 조회 1,411
10년 전 조회 1,599
10년 전 조회 1,429
10년 전 조회 1,550
10년 전 조회 1,391
10년 전 조회 1,348
10년 전 조회 1,358
10년 전 조회 1,396
10년 전 조회 1,384
10년 전 조회 1,417
10년 전 조회 1,453
10년 전 조회 1,422
10년 전 조회 1,575
10년 전 조회 1,563
10년 전 조회 1,356
10년 전 조회 1,661
10년 전 조회 2,004
10년 전 조회 1,461
10년 전 조회 1,704
10년 전 조회 1,668
10년 전 조회 1,528
10년 전 조회 1,478
10년 전 조회 1,445
10년 전 조회 1,552
10년 전 조회 1,289
10년 전 조회 1,379
10년 전 조회 1,600
10년 전 조회 1,426
10년 전 조회 1,410
10년 전 조회 1,363
10년 전 조회 1,402
10년 전 조회 1,392
10년 전 조회 1,395
10년 전 조회 1,424
10년 전 조회 1,375
10년 전 조회 1,538
10년 전 조회 1,360
10년 전 조회 1,374
10년 전 조회 1,468
10년 전 조회 2,195
10년 전 조회 1,429
10년 전 조회 1,414
10년 전 조회 1,495
10년 전 조회 1,406
10년 전 조회 1,603
10년 전 조회 1,496
10년 전 조회 1,417
10년 전 조회 1,421
10년 전 조회 1,454
10년 전 조회 1,441
10년 전 조회 1,367
10년 전 조회 1,324
10년 전 조회 1,309
10년 전 조회 1,340
10년 전 조회 1,732
10년 전 조회 1,358
10년 전 조회 1,467
10년 전 조회 1,420
10년 전 조회 1,653
10년 전 조회 1,459
10년 전 조회 1,391
10년 전 조회 1,405
10년 전 조회 1,444
10년 전 조회 1,563
10년 전 조회 1,494