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

· 10년 전 · 1388

<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,439
10년 전 조회 1,322
10년 전 조회 1,284
10년 전 조회 1,320
10년 전 조회 1,328
10년 전 조회 1,379
10년 전 조회 1,301
10년 전 조회 1,522
10년 전 조회 1,673
10년 전 조회 1,584
10년 전 조회 1,338
10년 전 조회 1,330
10년 전 조회 1,300
10년 전 조회 1,284
10년 전 조회 1,404
10년 전 조회 1,319
10년 전 조회 1,281
10년 전 조회 1,332
10년 전 조회 1,672
10년 전 조회 2,146
10년 전 조회 1,715
10년 전 조회 1,514
10년 전 조회 1,375
10년 전 조회 1,341
10년 전 조회 1,365
10년 전 조회 1,321
10년 전 조회 1,343
10년 전 조회 1,363
10년 전 조회 1,531
10년 전 조회 1,417
10년 전 조회 2,157
10년 전 조회 1,696
10년 전 조회 1,439
10년 전 조회 1,525
10년 전 조회 1,760
10년 전 조회 1,442
10년 전 조회 1,625
10년 전 조회 1,461
10년 전 조회 1,574
10년 전 조회 1,420
10년 전 조회 1,375
10년 전 조회 1,385
10년 전 조회 1,425
10년 전 조회 1,423
10년 전 조회 1,454
10년 전 조회 1,490
10년 전 조회 1,454
10년 전 조회 1,609
10년 전 조회 1,590
10년 전 조회 1,389
10년 전 조회 1,700
10년 전 조회 2,030
10년 전 조회 1,494
10년 전 조회 1,734
10년 전 조회 1,699
10년 전 조회 1,550
10년 전 조회 1,515
10년 전 조회 1,484
10년 전 조회 1,583
10년 전 조회 1,323
10년 전 조회 1,408
10년 전 조회 1,624
10년 전 조회 1,454
10년 전 조회 1,434
10년 전 조회 1,402
10년 전 조회 1,426
10년 전 조회 1,435
10년 전 조회 1,427
10년 전 조회 1,457
10년 전 조회 1,403
10년 전 조회 1,571
10년 전 조회 1,402
10년 전 조회 1,402
10년 전 조회 1,507
10년 전 조회 2,226
10년 전 조회 1,470
10년 전 조회 1,440
10년 전 조회 1,528
10년 전 조회 1,442
10년 전 조회 1,631
10년 전 조회 1,527
10년 전 조회 1,447
10년 전 조회 1,450
10년 전 조회 1,476
10년 전 조회 1,462
10년 전 조회 1,397
10년 전 조회 1,358
10년 전 조회 1,339
10년 전 조회 1,372
10년 전 조회 1,765
10년 전 조회 1,394
10년 전 조회 1,495
10년 전 조회 1,445
10년 전 조회 1,681
10년 전 조회 1,492
10년 전 조회 1,418
10년 전 조회 1,439
10년 전 조회 1,471
10년 전 조회 1,596
10년 전 조회 1,521