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

· 10년 전 · 1615

<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,647
10년 전 조회 1,567
10년 전 조회 1,523
10년 전 조회 1,522
10년 전 조회 1,557
10년 전 조회 1,591
10년 전 조회 1,525
10년 전 조회 1,718
10년 전 조회 1,874
10년 전 조회 1,802
10년 전 조회 1,571
10년 전 조회 1,564
10년 전 조회 1,504
10년 전 조회 1,505
10년 전 조회 1,606
10년 전 조회 1,512
10년 전 조회 1,481
10년 전 조회 1,535
10년 전 조회 1,879
10년 전 조회 2,341
10년 전 조회 1,916
10년 전 조회 1,735
10년 전 조회 1,575
10년 전 조회 1,545
10년 전 조회 1,574
10년 전 조회 1,544
10년 전 조회 1,552
10년 전 조회 1,555
10년 전 조회 1,720
10년 전 조회 1,626
10년 전 조회 2,376
10년 전 조회 1,895
10년 전 조회 1,655
10년 전 조회 1,735
10년 전 조회 1,950
10년 전 조회 1,640
10년 전 조회 1,867
10년 전 조회 1,694
10년 전 조회 1,802
10년 전 조회 1,633
10년 전 조회 1,589
10년 전 조회 1,589
10년 전 조회 1,641
10년 전 조회 1,615
10년 전 조회 1,670
10년 전 조회 1,682
10년 전 조회 1,663
10년 전 조회 1,819
10년 전 조회 1,821
10년 전 조회 1,616
10년 전 조회 1,911
10년 전 조회 2,235
10년 전 조회 1,696
10년 전 조회 1,963
10년 전 조회 1,920
10년 전 조회 1,772
10년 전 조회 1,745
10년 전 조회 1,688
10년 전 조회 1,793
10년 전 조회 1,549
10년 전 조회 1,630
10년 전 조회 1,848
10년 전 조회 1,662
10년 전 조회 1,610
10년 전 조회 1,619
10년 전 조회 1,629
10년 전 조회 1,660
10년 전 조회 1,641
10년 전 조회 1,654
10년 전 조회 1,619
10년 전 조회 1,786
10년 전 조회 1,591
10년 전 조회 1,608
10년 전 조회 1,726
10년 전 조회 2,401
10년 전 조회 1,672
10년 전 조회 1,645
10년 전 조회 1,728
10년 전 조회 1,626
10년 전 조회 1,805
10년 전 조회 1,712
10년 전 조회 1,642
10년 전 조회 1,627
10년 전 조회 1,657
10년 전 조회 1,663
10년 전 조회 1,588
10년 전 조회 1,539
10년 전 조회 1,522
10년 전 조회 1,553
10년 전 조회 1,975
10년 전 조회 1,576
10년 전 조회 1,695
10년 전 조회 1,622
10년 전 조회 1,866
10년 전 조회 1,685
10년 전 조회 1,586
10년 전 조회 1,631
10년 전 조회 1,671
10년 전 조회 1,781
10년 전 조회 1,729