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

· 10년 전 · 1361

<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,426
10년 전 조회 1,297
10년 전 조회 1,260
10년 전 조회 1,292
10년 전 조회 1,306
10년 전 조회 1,350
10년 전 조회 1,276
10년 전 조회 1,508
10년 전 조회 1,641
10년 전 조회 1,557
10년 전 조회 1,316
10년 전 조회 1,305
10년 전 조회 1,273
10년 전 조회 1,263
10년 전 조회 1,388
10년 전 조회 1,302
10년 전 조회 1,258
10년 전 조회 1,309
10년 전 조회 1,650
10년 전 조회 2,130
10년 전 조회 1,693
10년 전 조회 1,489
10년 전 조회 1,349
10년 전 조회 1,319
10년 전 조회 1,341
10년 전 조회 1,296
10년 전 조회 1,315
10년 전 조회 1,339
10년 전 조회 1,504
10년 전 조회 1,402
10년 전 조회 2,138
10년 전 조회 1,664
10년 전 조회 1,411
10년 전 조회 1,506
10년 전 조회 1,737
10년 전 조회 1,420
10년 전 조회 1,605
10년 전 조회 1,433
10년 전 조회 1,553
10년 전 조회 1,394
10년 전 조회 1,353
10년 전 조회 1,361
10년 전 조회 1,403
10년 전 조회 1,393
10년 전 조회 1,420
10년 전 조회 1,461
10년 전 조회 1,429
10년 전 조회 1,579
10년 전 조회 1,569
10년 전 조회 1,362
10년 전 조회 1,671
10년 전 조회 2,010
10년 전 조회 1,466
10년 전 조회 1,709
10년 전 조회 1,671
10년 전 조회 1,533
10년 전 조회 1,491
10년 전 조회 1,453
10년 전 조회 1,557
10년 전 조회 1,297
10년 전 조회 1,385
10년 전 조회 1,604
10년 전 조회 1,431
10년 전 조회 1,416
10년 전 조회 1,374
10년 전 조회 1,408
10년 전 조회 1,402
10년 전 조회 1,402
10년 전 조회 1,429
10년 전 조회 1,383
10년 전 조회 1,546
10년 전 조회 1,366
10년 전 조회 1,378
10년 전 조회 1,479
10년 전 조회 2,204
10년 전 조회 1,440
10년 전 조회 1,418
10년 전 조회 1,502
10년 전 조회 1,414
10년 전 조회 1,610
10년 전 조회 1,501
10년 전 조회 1,423
10년 전 조회 1,430
10년 전 조회 1,461
10년 전 조회 1,443
10년 전 조회 1,376
10년 전 조회 1,335
10년 전 조회 1,312
10년 전 조회 1,352
10년 전 조회 1,739
10년 전 조회 1,368
10년 전 조회 1,473
10년 전 조회 1,430
10년 전 조회 1,661
10년 전 조회 1,465
10년 전 조회 1,394
10년 전 조회 1,410
10년 전 조회 1,449
10년 전 조회 1,570
10년 전 조회 1,499