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

· 10년 전 · 1590

<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,633
10년 전 조회 1,543
10년 전 조회 1,498
10년 전 조회 1,496
10년 전 조회 1,537
10년 전 조회 1,564
10년 전 조회 1,508
10년 전 조회 1,701
10년 전 조회 1,843
10년 전 조회 1,773
10년 전 조회 1,545
10년 전 조회 1,545
10년 전 조회 1,491
10년 전 조회 1,488
10년 전 조회 1,582
10년 전 조회 1,492
10년 전 조회 1,457
10년 전 조회 1,519
10년 전 조회 1,855
10년 전 조회 2,320
10년 전 조회 1,890
10년 전 조회 1,708
10년 전 조회 1,560
10년 전 조회 1,519
10년 전 조회 1,548
10년 전 조회 1,522
10년 전 조회 1,530
10년 전 조회 1,529
10년 전 조회 1,700
10년 전 조회 1,608
10년 전 조회 2,355
10년 전 조회 1,873
10년 전 조회 1,631
10년 전 조회 1,724
10년 전 조회 1,931
10년 전 조회 1,625
10년 전 조회 1,843
10년 전 조회 1,677
10년 전 조회 1,786
10년 전 조회 1,622
10년 전 조회 1,580
10년 전 조회 1,574
10년 전 조회 1,620
10년 전 조회 1,593
10년 전 조회 1,646
10년 전 조회 1,660
10년 전 조회 1,639
10년 전 조회 1,796
10년 전 조회 1,790
10년 전 조회 1,591
10년 전 조회 1,888
10년 전 조회 2,218
10년 전 조회 1,670
10년 전 조회 1,942
10년 전 조회 1,901
10년 전 조회 1,748
10년 전 조회 1,728
10년 전 조회 1,662
10년 전 조회 1,767
10년 전 조회 1,525
10년 전 조회 1,608
10년 전 조회 1,824
10년 전 조회 1,648
10년 전 조회 1,596
10년 전 조회 1,598
10년 전 조회 1,603
10년 전 조회 1,640
10년 전 조회 1,625
10년 전 조회 1,637
10년 전 조회 1,594
10년 전 조회 1,767
10년 전 조회 1,567
10년 전 조회 1,593
10년 전 조회 1,707
10년 전 조회 2,379
10년 전 조회 1,648
10년 전 조회 1,625
10년 전 조회 1,702
10년 전 조회 1,608
10년 전 조회 1,784
10년 전 조회 1,698
10년 전 조회 1,620
10년 전 조회 1,605
10년 전 조회 1,642
10년 전 조회 1,648
10년 전 조회 1,570
10년 전 조회 1,519
10년 전 조회 1,506
10년 전 조회 1,537
10년 전 조회 1,950
10년 전 조회 1,558
10년 전 조회 1,675
10년 전 조회 1,606
10년 전 조회 1,847
10년 전 조회 1,667
10년 전 조회 1,575
10년 전 조회 1,617
10년 전 조회 1,649
10년 전 조회 1,760
10년 전 조회 1,709