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

· 10년 전 · 1383

<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,435
10년 전 조회 1,317
10년 전 조회 1,281
10년 전 조회 1,314
10년 전 조회 1,324
10년 전 조회 1,374
10년 전 조회 1,297
10년 전 조회 1,520
10년 전 조회 1,665
10년 전 조회 1,578
10년 전 조회 1,332
10년 전 조회 1,326
10년 전 조회 1,292
10년 전 조회 1,277
10년 전 조회 1,400
10년 전 조회 1,316
10년 전 조회 1,279
10년 전 조회 1,329
10년 전 조회 1,664
10년 전 조회 2,141
10년 전 조회 1,711
10년 전 조회 1,506
10년 전 조회 1,366
10년 전 조회 1,335
10년 전 조회 1,358
10년 전 조회 1,316
10년 전 조회 1,339
10년 전 조회 1,357
10년 전 조회 1,528
10년 전 조회 1,412
10년 전 조회 2,153
10년 전 조회 1,686
10년 전 조회 1,435
10년 전 조회 1,519
10년 전 조회 1,748
10년 전 조회 1,439
10년 전 조회 1,622
10년 전 조회 1,454
10년 전 조회 1,568
10년 전 조회 1,413
10년 전 조회 1,370
10년 전 조회 1,380
10년 전 조회 1,422
10년 전 조회 1,421
10년 전 조회 1,445
10년 전 조회 1,485
10년 전 조회 1,447
10년 전 조회 1,605
10년 전 조회 1,583
10년 전 조회 1,384
10년 전 조회 1,689
10년 전 조회 2,021
10년 전 조회 1,486
10년 전 조회 1,730
10년 전 조회 1,692
10년 전 조회 1,548
10년 전 조회 1,511
10년 전 조회 1,481
10년 전 조회 1,574
10년 전 조회 1,319
10년 전 조회 1,405
10년 전 조회 1,623
10년 전 조회 1,451
10년 전 조회 1,432
10년 전 조회 1,393
10년 전 조회 1,422
10년 전 조회 1,427
10년 전 조회 1,424
10년 전 조회 1,455
10년 전 조회 1,401
10년 전 조회 1,565
10년 전 조회 1,393
10년 전 조회 1,400
10년 전 조회 1,498
10년 전 조회 2,218
10년 전 조회 1,462
10년 전 조회 1,434
10년 전 조회 1,525
10년 전 조회 1,434
10년 전 조회 1,628
10년 전 조회 1,523
10년 전 조회 1,446
10년 전 조회 1,446
10년 전 조회 1,472
10년 전 조회 1,459
10년 전 조회 1,388
10년 전 조회 1,356
10년 전 조회 1,331
10년 전 조회 1,368
10년 전 조회 1,761
10년 전 조회 1,388
10년 전 조회 1,490
10년 전 조회 1,443
10년 전 조회 1,680
10년 전 조회 1,488
10년 전 조회 1,413
10년 전 조회 1,434
10년 전 조회 1,467
10년 전 조회 1,593
10년 전 조회 1,515