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

· 10년 전 · 1397

<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,445
10년 전 조회 1,338
10년 전 조회 1,295
10년 전 조회 1,324
10년 전 조회 1,338
10년 전 조회 1,389
10년 전 조회 1,315
10년 전 조회 1,530
10년 전 조회 1,685
10년 전 조회 1,592
10년 전 조회 1,348
10년 전 조회 1,347
10년 전 조회 1,311
10년 전 조회 1,295
10년 전 조회 1,416
10년 전 조회 1,326
10년 전 조회 1,289
10년 전 조회 1,341
10년 전 조회 1,685
10년 전 조회 2,157
10년 전 조회 1,724
10년 전 조회 1,521
10년 전 조회 1,382
10년 전 조회 1,352
10년 전 조회 1,377
10년 전 조회 1,334
10년 전 조회 1,355
10년 전 조회 1,370
10년 전 조회 1,540
10년 전 조회 1,427
10년 전 조회 2,165
10년 전 조회 1,708
10년 전 조회 1,448
10년 전 조회 1,541
10년 전 조회 1,770
10년 전 조회 1,455
10년 전 조회 1,638
10년 전 조회 1,472
10년 전 조회 1,592
10년 전 조회 1,429
10년 전 조회 1,392
10년 전 조회 1,396
10년 전 조회 1,441
10년 전 조회 1,435
10년 전 조회 1,462
10년 전 조회 1,497
10년 전 조회 1,467
10년 전 조회 1,621
10년 전 조회 1,601
10년 전 조회 1,398
10년 전 조회 1,709
10년 전 조회 2,039
10년 전 조회 1,502
10년 전 조회 1,744
10년 전 조회 1,710
10년 전 조회 1,561
10년 전 조회 1,528
10년 전 조회 1,489
10년 전 조회 1,592
10년 전 조회 1,332
10년 전 조회 1,417
10년 전 조회 1,633
10년 전 조회 1,465
10년 전 조회 1,444
10년 전 조회 1,410
10년 전 조회 1,437
10년 전 조회 1,445
10년 전 조회 1,439
10년 전 조회 1,468
10년 전 조회 1,410
10년 전 조회 1,579
10년 전 조회 1,411
10년 전 조회 1,413
10년 전 조회 1,523
10년 전 조회 2,233
10년 전 조회 1,483
10년 전 조회 1,452
10년 전 조회 1,542
10년 전 조회 1,448
10년 전 조회 1,637
10년 전 조회 1,536
10년 전 조회 1,458
10년 전 조회 1,458
10년 전 조회 1,485
10년 전 조회 1,469
10년 전 조회 1,410
10년 전 조회 1,366
10년 전 조회 1,347
10년 전 조회 1,377
10년 전 조회 1,773
10년 전 조회 1,411
10년 전 조회 1,504
10년 전 조회 1,452
10년 전 조회 1,688
10년 전 조회 1,499
10년 전 조회 1,427
10년 전 조회 1,448
10년 전 조회 1,484
10년 전 조회 1,606
10년 전 조회 1,532