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

· 10년 전 · 1342

<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,286
10년 전 조회 1,244
10년 전 조회 1,271
10년 전 조회 1,280
10년 전 조회 1,329
10년 전 조회 1,259
10년 전 조회 1,488
10년 전 조회 1,626
10년 전 조회 1,530
10년 전 조회 1,294
10년 전 조회 1,286
10년 전 조회 1,253
10년 전 조회 1,247
10년 전 조회 1,370
10년 전 조회 1,287
10년 전 조회 1,237
10년 전 조회 1,288
10년 전 조회 1,636
10년 전 조회 2,109
10년 전 조회 1,677
10년 전 조회 1,506
10년 전 조회 1,473
10년 전 조회 1,320
10년 전 조회 1,302
10년 전 조회 1,323
10년 전 조회 1,279
10년 전 조회 1,296
10년 전 조회 1,320
10년 전 조회 1,484
10년 전 조회 1,383
10년 전 조회 2,114
10년 전 조회 1,646
10년 전 조회 1,395
10년 전 조회 1,484
10년 전 조회 1,719
10년 전 조회 1,400
10년 전 조회 1,585
10년 전 조회 1,412
10년 전 조회 1,540
10년 전 조회 1,378
10년 전 조회 1,342
10년 전 조회 1,350
10년 전 조회 1,382
10년 전 조회 1,375
10년 전 조회 1,410
10년 전 조회 1,439
10년 전 조회 1,408
10년 전 조회 1,563
10년 전 조회 1,550
10년 전 조회 1,343
10년 전 조회 1,648
10년 전 조회 1,991
10년 전 조회 1,447
10년 전 조회 1,696
10년 전 조회 1,659
10년 전 조회 1,519
10년 전 조회 1,463
10년 전 조회 1,431
10년 전 조회 1,542
10년 전 조회 1,271
10년 전 조회 1,367
10년 전 조회 1,589
10년 전 조회 1,408
10년 전 조회 1,401
10년 전 조회 1,351
10년 전 조회 1,392
10년 전 조회 1,374
10년 전 조회 1,383
10년 전 조회 1,409
10년 전 조회 1,359
10년 전 조회 1,520
10년 전 조회 1,343
10년 전 조회 1,359
10년 전 조회 1,454
10년 전 조회 2,176
10년 전 조회 1,418
10년 전 조회 1,401
10년 전 조회 1,476
10년 전 조회 1,393
10년 전 조회 1,586
10년 전 조회 1,482
10년 전 조회 1,402
10년 전 조회 1,405
10년 전 조회 1,449
10년 전 조회 1,428
10년 전 조회 1,350
10년 전 조회 1,309
10년 전 조회 1,285
10년 전 조회 1,318
10년 전 조회 1,710
10년 전 조회 1,343
10년 전 조회 1,457
10년 전 조회 1,402
10년 전 조회 1,634
10년 전 조회 1,438
10년 전 조회 1,378
10년 전 조회 1,389
10년 전 조회 1,424
10년 전 조회 1,546
10년 전 조회 1,488