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

· 10년 전 · 1351

<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,418
10년 전 조회 1,293
10년 전 조회 1,253
10년 전 조회 1,286
10년 전 조회 1,297
10년 전 조회 1,345
10년 전 조회 1,270
10년 전 조회 1,501
10년 전 조회 1,638
10년 전 조회 1,547
10년 전 조회 1,308
10년 전 조회 1,300
10년 전 조회 1,264
10년 전 조회 1,257
10년 전 조회 1,380
10년 전 조회 1,299
10년 전 조회 1,252
10년 전 조회 1,304
10년 전 조회 1,645
10년 전 조회 2,121
10년 전 조회 1,687
10년 전 조회 1,481
10년 전 조회 1,340
10년 전 조회 1,312
10년 전 조회 1,336
10년 전 조회 1,290
10년 전 조회 1,308
10년 전 조회 1,332
10년 전 조회 1,496
10년 전 조회 1,395
10년 전 조회 2,130
10년 전 조회 1,657
10년 전 조회 1,406
10년 전 조회 1,501
10년 전 조회 1,730
10년 전 조회 1,409
10년 전 조회 1,599
10년 전 조회 1,427
10년 전 조회 1,548
10년 전 조회 1,390
10년 전 조회 1,348
10년 전 조회 1,357
10년 전 조회 1,392
10년 전 조회 1,384
10년 전 조회 1,416
10년 전 조회 1,453
10년 전 조회 1,421
10년 전 조회 1,574
10년 전 조회 1,563
10년 전 조회 1,352
10년 전 조회 1,661
10년 전 조회 2,004
10년 전 조회 1,461
10년 전 조회 1,704
10년 전 조회 1,668
10년 전 조회 1,527
10년 전 조회 1,478
10년 전 조회 1,444
10년 전 조회 1,552
10년 전 조회 1,288
10년 전 조회 1,379
10년 전 조회 1,599
10년 전 조회 1,425
10년 전 조회 1,410
10년 전 조회 1,363
10년 전 조회 1,400
10년 전 조회 1,392
10년 전 조회 1,395
10년 전 조회 1,423
10년 전 조회 1,375
10년 전 조회 1,538
10년 전 조회 1,360
10년 전 조회 1,373
10년 전 조회 1,468
10년 전 조회 2,195
10년 전 조회 1,428
10년 전 조회 1,414
10년 전 조회 1,495
10년 전 조회 1,405
10년 전 조회 1,600
10년 전 조회 1,496
10년 전 조회 1,417
10년 전 조회 1,420
10년 전 조회 1,454
10년 전 조회 1,440
10년 전 조회 1,365
10년 전 조회 1,323
10년 전 조회 1,309
10년 전 조회 1,338
10년 전 조회 1,732
10년 전 조회 1,357
10년 전 조회 1,467
10년 전 조회 1,419
10년 전 조회 1,653
10년 전 조회 1,456
10년 전 조회 1,390
10년 전 조회 1,405
10년 전 조회 1,444
10년 전 조회 1,561
10년 전 조회 1,494