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

· 10년 전 · 1356

<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,423
10년 전 조회 1,295
10년 전 조회 1,255
10년 전 조회 1,288
10년 전 조회 1,301
10년 전 조회 1,346
10년 전 조회 1,272
10년 전 조회 1,502
10년 전 조회 1,638
10년 전 조회 1,550
10년 전 조회 1,309
10년 전 조회 1,303
10년 전 조회 1,268
10년 전 조회 1,259
10년 전 조회 1,383
10년 전 조회 1,299
10년 전 조회 1,256
10년 전 조회 1,305
10년 전 조회 1,647
10년 전 조회 2,122
10년 전 조회 1,689
10년 전 조회 1,484
10년 전 조회 1,342
10년 전 조회 1,313
10년 전 조회 1,340
10년 전 조회 1,292
10년 전 조회 1,311
10년 전 조회 1,335
10년 전 조회 1,499
10년 전 조회 1,396
10년 전 조회 2,131
10년 전 조회 1,658
10년 전 조회 1,408
10년 전 조회 1,504
10년 전 조회 1,731
10년 전 조회 1,413
10년 전 조회 1,599
10년 전 조회 1,431
10년 전 조회 1,550
10년 전 조회 1,392
10년 전 조회 1,350
10년 전 조회 1,358
10년 전 조회 1,396
10년 전 조회 1,385
10년 전 조회 1,417
10년 전 조회 1,454
10년 전 조회 1,426
10년 전 조회 1,576
10년 전 조회 1,563
10년 전 조회 1,357
10년 전 조회 1,663
10년 전 조회 2,005
10년 전 조회 1,462
10년 전 조회 1,704
10년 전 조회 1,669
10년 전 조회 1,529
10년 전 조회 1,482
10년 전 조회 1,448
10년 전 조회 1,552
10년 전 조회 1,292
10년 전 조회 1,381
10년 전 조회 1,601
10년 전 조회 1,426
10년 전 조회 1,412
10년 전 조회 1,364
10년 전 조회 1,403
10년 전 조회 1,394
10년 전 조회 1,396
10년 전 조회 1,426
10년 전 조회 1,376
10년 전 조회 1,539
10년 전 조회 1,361
10년 전 조회 1,374
10년 전 조회 1,472
10년 전 조회 2,195
10년 전 조회 1,432
10년 전 조회 1,414
10년 전 조회 1,496
10년 전 조회 1,408
10년 전 조회 1,603
10년 전 조회 1,496
10년 전 조회 1,418
10년 전 조회 1,423
10년 전 조회 1,455
10년 전 조회 1,442
10년 전 조회 1,368
10년 전 조회 1,329
10년 전 조회 1,310
10년 전 조회 1,343
10년 전 조회 1,733
10년 전 조회 1,358
10년 전 조회 1,468
10년 전 조회 1,423
10년 전 조회 1,654
10년 전 조회 1,459
10년 전 조회 1,392
10년 전 조회 1,405
10년 전 조회 1,447
10년 전 조회 1,565
10년 전 조회 1,496