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

· 10년 전 · 1597

<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,635
10년 전 조회 1,549
10년 전 조회 1,500
10년 전 조회 1,499
10년 전 조회 1,540
10년 전 조회 1,566
10년 전 조회 1,510
10년 전 조회 1,703
10년 전 조회 1,847
10년 전 조회 1,779
10년 전 조회 1,547
10년 전 조회 1,549
10년 전 조회 1,494
10년 전 조회 1,490
10년 전 조회 1,585
10년 전 조회 1,494
10년 전 조회 1,458
10년 전 조회 1,522
10년 전 조회 1,861
10년 전 조회 2,321
10년 전 조회 1,892
10년 전 조회 1,710
10년 전 조회 1,561
10년 전 조회 1,523
10년 전 조회 1,552
10년 전 조회 1,522
10년 전 조회 1,534
10년 전 조회 1,534
10년 전 조회 1,705
10년 전 조회 1,610
10년 전 조회 2,358
10년 전 조회 1,876
10년 전 조회 1,634
10년 전 조회 1,724
10년 전 조회 1,931
10년 전 조회 1,625
10년 전 조회 1,844
10년 전 조회 1,679
10년 전 조회 1,791
10년 전 조회 1,622
10년 전 조회 1,581
10년 전 조회 1,576
10년 전 조회 1,624
10년 전 조회 1,594
10년 전 조회 1,654
10년 전 조회 1,666
10년 전 조회 1,641
10년 전 조회 1,797
10년 전 조회 1,794
10년 전 조회 1,598
10년 전 조회 1,894
10년 전 조회 2,220
10년 전 조회 1,672
10년 전 조회 1,944
10년 전 조회 1,904
10년 전 조회 1,753
10년 전 조회 1,732
10년 전 조회 1,665
10년 전 조회 1,770
10년 전 조회 1,530
10년 전 조회 1,610
10년 전 조회 1,829
10년 전 조회 1,650
10년 전 조회 1,597
10년 전 조회 1,598
10년 전 조회 1,605
10년 전 조회 1,643
10년 전 조회 1,626
10년 전 조회 1,637
10년 전 조회 1,598
10년 전 조회 1,770
10년 전 조회 1,570
10년 전 조회 1,595
10년 전 조회 1,708
10년 전 조회 2,381
10년 전 조회 1,651
10년 전 조회 1,627
10년 전 조회 1,703
10년 전 조회 1,608
10년 전 조회 1,785
10년 전 조회 1,699
10년 전 조회 1,621
10년 전 조회 1,606
10년 전 조회 1,642
10년 전 조회 1,650
10년 전 조회 1,572
10년 전 조회 1,519
10년 전 조회 1,506
10년 전 조회 1,538
10년 전 조회 1,951
10년 전 조회 1,559
10년 전 조회 1,676
10년 전 조회 1,606
10년 전 조회 1,849
10년 전 조회 1,668
10년 전 조회 1,575
10년 전 조회 1,619
10년 전 조회 1,650
10년 전 조회 1,763
10년 전 조회 1,712