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

· 10년 전 · 1345

<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,274
10년 전 조회 1,285
10년 전 조회 1,334
10년 전 조회 1,265
10년 전 조회 1,493
10년 전 조회 1,627
10년 전 조회 1,537
10년 전 조회 1,300
10년 전 조회 1,292
10년 전 조회 1,259
10년 전 조회 1,249
10년 전 조회 1,374
10년 전 조회 1,290
10년 전 조회 1,241
10년 전 조회 1,291
10년 전 조회 1,638
10년 전 조회 2,113
10년 전 조회 1,680
10년 전 조회 1,506
10년 전 조회 1,473
10년 전 조회 1,326
10년 전 조회 1,307
10년 전 조회 1,329
10년 전 조회 1,282
10년 전 조회 1,299
10년 전 조회 1,324
10년 전 조회 1,487
10년 전 조회 1,385
10년 전 조회 2,118
10년 전 조회 1,649
10년 전 조회 1,399
10년 전 조회 1,488
10년 전 조회 1,722
10년 전 조회 1,402
10년 전 조회 1,588
10년 전 조회 1,416
10년 전 조회 1,543
10년 전 조회 1,380
10년 전 조회 1,343
10년 전 조회 1,352
10년 전 조회 1,385
10년 전 조회 1,379
10년 전 조회 1,411
10년 전 조회 1,442
10년 전 조회 1,411
10년 전 조회 1,565
10년 전 조회 1,553
10년 전 조회 1,346
10년 전 조회 1,652
10년 전 조회 1,997
10년 전 조회 1,451
10년 전 조회 1,699
10년 전 조회 1,660
10년 전 조회 1,521
10년 전 조회 1,471
10년 전 조회 1,435
10년 전 조회 1,542
10년 전 조회 1,279
10년 전 조회 1,371
10년 전 조회 1,591
10년 전 조회 1,411
10년 전 조회 1,403
10년 전 조회 1,354
10년 전 조회 1,394
10년 전 조회 1,379
10년 전 조회 1,385
10년 전 조회 1,412
10년 전 조회 1,363
10년 전 조회 1,523
10년 전 조회 1,347
10년 전 조회 1,362
10년 전 조회 1,461
10년 전 조회 2,184
10년 전 조회 1,419
10년 전 조회 1,404
10년 전 조회 1,483
10년 전 조회 1,396
10년 전 조회 1,591
10년 전 조회 1,486
10년 전 조회 1,405
10년 전 조회 1,411
10년 전 조회 1,451
10년 전 조회 1,432
10년 전 조회 1,353
10년 전 조회 1,312
10년 전 조회 1,287
10년 전 조회 1,326
10년 전 조회 1,717
10년 전 조회 1,348
10년 전 조회 1,460
10년 전 조회 1,408
10년 전 조회 1,643
10년 전 조회 1,445
10년 전 조회 1,382
10년 전 조회 1,394
10년 전 조회 1,428
10년 전 조회 1,548
10년 전 조회 1,492