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

· 10년 전 · 1637

<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,678
10년 전 조회 1,590
10년 전 조회 1,553
10년 전 조회 1,552
10년 전 조회 1,574
10년 전 조회 1,616
10년 전 조회 1,557
10년 전 조회 1,752
10년 전 조회 1,894
10년 전 조회 1,830
10년 전 조회 1,588
10년 전 조회 1,585
10년 전 조회 1,531
10년 전 조회 1,535
10년 전 조회 1,634
10년 전 조회 1,539
10년 전 조회 1,507
10년 전 조회 1,556
10년 전 조회 1,905
10년 전 조회 2,366
10년 전 조회 1,941
10년 전 조회 1,755
10년 전 조회 1,599
10년 전 조회 1,577
10년 전 조회 1,598
10년 전 조회 1,561
10년 전 조회 1,569
10년 전 조회 1,570
10년 전 조회 1,747
10년 전 조회 1,649
10년 전 조회 2,394
10년 전 조회 1,914
10년 전 조회 1,677
10년 전 조회 1,768
10년 전 조회 1,972
10년 전 조회 1,662
10년 전 조회 1,888
10년 전 조회 1,715
10년 전 조회 1,821
10년 전 조회 1,657
10년 전 조회 1,614
10년 전 조회 1,614
10년 전 조회 1,662
10년 전 조회 1,634
10년 전 조회 1,693
10년 전 조회 1,701
10년 전 조회 1,695
10년 전 조회 1,850
10년 전 조회 1,846
10년 전 조회 1,638
10년 전 조회 1,939
10년 전 조회 2,246
10년 전 조회 1,719
10년 전 조회 1,979
10년 전 조회 1,937
10년 전 조회 1,791
10년 전 조회 1,771
10년 전 조회 1,709
10년 전 조회 1,816
10년 전 조회 1,574
10년 전 조회 1,655
10년 전 조회 1,871
10년 전 조회 1,686
10년 전 조회 1,640
10년 전 조회 1,641
10년 전 조회 1,657
10년 전 조회 1,686
10년 전 조회 1,664
10년 전 조회 1,677
10년 전 조회 1,634
10년 전 조회 1,804
10년 전 조회 1,614
10년 전 조회 1,636
10년 전 조회 1,742
10년 전 조회 2,425
10년 전 조회 1,690
10년 전 조회 1,663
10년 전 조회 1,748
10년 전 조회 1,645
10년 전 조회 1,824
10년 전 조회 1,732
10년 전 조회 1,654
10년 전 조회 1,642
10년 전 조회 1,672
10년 전 조회 1,674
10년 전 조회 1,608
10년 전 조회 1,550
10년 전 조회 1,540
10년 전 조회 1,570
10년 전 조회 1,990
10년 전 조회 1,595
10년 전 조회 1,711
10년 전 조회 1,640
10년 전 조회 1,881
10년 전 조회 1,707
10년 전 조회 1,605
10년 전 조회 1,649
10년 전 조회 1,689
10년 전 조회 1,797
10년 전 조회 1,745