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

· 10년 전 · 1465

<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,510
10년 전 조회 1,411
10년 전 조회 1,367
10년 전 조회 1,383
10년 전 조회 1,399
10년 전 조회 1,442
10년 전 조회 1,373
10년 전 조회 1,594
10년 전 조회 1,744
10년 전 조회 1,654
10년 전 조회 1,419
10년 전 조회 1,415
10년 전 조회 1,368
10년 전 조회 1,360
10년 전 조회 1,468
10년 전 조회 1,380
10년 전 조회 1,334
10년 전 조회 1,400
10년 전 조회 1,741
10년 전 조회 2,216
10년 전 조회 1,772
10년 전 조회 1,576
10년 전 조회 1,450
10년 전 조회 1,420
10년 전 조회 1,434
10년 전 조회 1,395
10년 전 조회 1,414
10년 전 조회 1,428
10년 전 조회 1,599
10년 전 조회 1,491
10년 전 조회 2,232
10년 전 조회 1,771
10년 전 조회 1,512
10년 전 조회 1,605
10년 전 조회 1,828
10년 전 조회 1,506
10년 전 조회 1,709
10년 전 조회 1,545
10년 전 조회 1,663
10년 전 조회 1,501
10년 전 조회 1,459
10년 전 조회 1,454
10년 전 조회 1,500
10년 전 조회 1,486
10년 전 조회 1,537
10년 전 조회 1,552
10년 전 조회 1,530
10년 전 조회 1,672
10년 전 조회 1,671
10년 전 조회 1,466
10년 전 조회 1,780
10년 전 조회 2,098
10년 전 조회 1,561
10년 전 조회 1,813
10년 전 조회 1,779
10년 전 조회 1,628
10년 전 조회 1,601
10년 전 조회 1,545
10년 전 조회 1,656
10년 전 조회 1,407
10년 전 조회 1,479
10년 전 조회 1,696
10년 전 조회 1,520
10년 전 조회 1,481
10년 전 조회 1,467
10년 전 조회 1,490
10년 전 조회 1,505
10년 전 조회 1,493
10년 전 조회 1,523
10년 전 조회 1,478
10년 전 조회 1,640
10년 전 조회 1,461
10년 전 조회 1,483
10년 전 조회 1,588
10년 전 조회 2,286
10년 전 조회 1,541
10년 전 조회 1,510
10년 전 조회 1,593
10년 전 조회 1,503
10년 전 조회 1,690
10년 전 조회 1,597
10년 전 조회 1,504
10년 전 조회 1,501
10년 전 조회 1,538
10년 전 조회 1,538
10년 전 조회 1,469
10년 전 조회 1,421
10년 전 조회 1,403
10년 전 조회 1,444
10년 전 조회 1,844
10년 전 조회 1,464
10년 전 조회 1,566
10년 전 조회 1,509
10년 전 조회 1,747
10년 전 조회 1,568
10년 전 조회 1,483
10년 전 조회 1,512
10년 전 조회 1,542
10년 전 조회 1,668
10년 전 조회 1,596