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

· 10년 전 · 1319

<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,268
10년 전 조회 1,223
10년 전 조회 1,242
10년 전 조회 1,258
10년 전 조회 1,319
10년 전 조회 1,240
10년 전 조회 1,461
10년 전 조회 1,615
10년 전 조회 1,508
10년 전 조회 1,272
10년 전 조회 1,267
10년 전 조회 1,230
10년 전 조회 1,224
10년 전 조회 1,347
10년 전 조회 1,273
10년 전 조회 1,218
10년 전 조회 1,271
10년 전 조회 1,621
10년 전 조회 2,081
10년 전 조회 1,659
10년 전 조회 1,489
10년 전 조회 1,457
10년 전 조회 1,295
10년 전 조회 1,281
10년 전 조회 1,301
10년 전 조회 1,263
10년 전 조회 1,272
10년 전 조회 1,305
10년 전 조회 1,465
10년 전 조회 1,368
10년 전 조회 2,092
10년 전 조회 1,631
10년 전 조회 1,375
10년 전 조회 1,465
10년 전 조회 1,712
10년 전 조회 1,386
10년 전 조회 1,573
10년 전 조회 1,401
10년 전 조회 1,518
10년 전 조회 1,364
10년 전 조회 1,331
10년 전 조회 1,328
10년 전 조회 1,359
10년 전 조회 1,358
10년 전 조회 1,393
10년 전 조회 1,419
10년 전 조회 1,394
10년 전 조회 1,547
10년 전 조회 1,531
10년 전 조회 1,320
10년 전 조회 1,623
10년 전 조회 1,973
10년 전 조회 1,425
10년 전 조회 1,678
10년 전 조회 1,637
10년 전 조회 1,492
10년 전 조회 1,437
10년 전 조회 1,407
10년 전 조회 1,522
10년 전 조회 1,255
10년 전 조회 1,346
10년 전 조회 1,565
10년 전 조회 1,389
10년 전 조회 1,388
10년 전 조회 1,331
10년 전 조회 1,377
10년 전 조회 1,362
10년 전 조회 1,363
10년 전 조회 1,394
10년 전 조회 1,324
10년 전 조회 1,500
10년 전 조회 1,326
10년 전 조회 1,332
10년 전 조회 1,421
10년 전 조회 2,156
10년 전 조회 1,392
10년 전 조회 1,380
10년 전 조회 1,465
10년 전 조회 1,379
10년 전 조회 1,558
10년 전 조회 1,459
10년 전 조회 1,387
10년 전 조회 1,373
10년 전 조회 1,431
10년 전 조회 1,404
10년 전 조회 1,328
10년 전 조회 1,285
10년 전 조회 1,261
10년 전 조회 1,301
10년 전 조회 1,685
10년 전 조회 1,320
10년 전 조회 1,439
10년 전 조회 1,386
10년 전 조회 1,608
10년 전 조회 1,413
10년 전 조회 1,356
10년 전 조회 1,367
10년 전 조회 1,402
10년 전 조회 1,518
10년 전 조회 1,464