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

· 10년 전 · 1400

<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,446
10년 전 조회 1,338
10년 전 조회 1,296
10년 전 조회 1,325
10년 전 조회 1,338
10년 전 조회 1,389
10년 전 조회 1,316
10년 전 조회 1,530
10년 전 조회 1,686
10년 전 조회 1,592
10년 전 조회 1,351
10년 전 조회 1,348
10년 전 조회 1,311
10년 전 조회 1,298
10년 전 조회 1,416
10년 전 조회 1,327
10년 전 조회 1,290
10년 전 조회 1,343
10년 전 조회 1,686
10년 전 조회 2,157
10년 전 조회 1,726
10년 전 조회 1,521
10년 전 조회 1,383
10년 전 조회 1,352
10년 전 조회 1,377
10년 전 조회 1,335
10년 전 조회 1,355
10년 전 조회 1,370
10년 전 조회 1,541
10년 전 조회 1,427
10년 전 조회 2,165
10년 전 조회 1,709
10년 전 조회 1,448
10년 전 조회 1,541
10년 전 조회 1,770
10년 전 조회 1,455
10년 전 조회 1,638
10년 전 조회 1,472
10년 전 조회 1,594
10년 전 조회 1,430
10년 전 조회 1,392
10년 전 조회 1,396
10년 전 조회 1,441
10년 전 조회 1,435
10년 전 조회 1,462
10년 전 조회 1,500
10년 전 조회 1,468
10년 전 조회 1,622
10년 전 조회 1,602
10년 전 조회 1,401
10년 전 조회 1,709
10년 전 조회 2,040
10년 전 조회 1,502
10년 전 조회 1,744
10년 전 조회 1,713
10년 전 조회 1,561
10년 전 조회 1,528
10년 전 조회 1,490
10년 전 조회 1,592
10년 전 조회 1,332
10년 전 조회 1,417
10년 전 조회 1,634
10년 전 조회 1,466
10년 전 조회 1,444
10년 전 조회 1,410
10년 전 조회 1,437
10년 전 조회 1,445
10년 전 조회 1,439
10년 전 조회 1,468
10년 전 조회 1,411
10년 전 조회 1,579
10년 전 조회 1,411
10년 전 조회 1,414
10년 전 조회 1,523
10년 전 조회 2,233
10년 전 조회 1,483
10년 전 조회 1,452
10년 전 조회 1,542
10년 전 조회 1,448
10년 전 조회 1,637
10년 전 조회 1,537
10년 전 조회 1,459
10년 전 조회 1,460
10년 전 조회 1,486
10년 전 조회 1,470
10년 전 조회 1,410
10년 전 조회 1,368
10년 전 조회 1,347
10년 전 조회 1,377
10년 전 조회 1,773
10년 전 조회 1,411
10년 전 조회 1,504
10년 전 조회 1,452
10년 전 조회 1,689
10년 전 조회 1,499
10년 전 조회 1,428
10년 전 조회 1,448
10년 전 조회 1,484
10년 전 조회 1,606
10년 전 조회 1,532