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

· 10년 전 · 1503

<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,543
10년 전 조회 1,442
10년 전 조회 1,408
10년 전 조회 1,415
10년 전 조회 1,435
10년 전 조회 1,470
10년 전 조회 1,409
10년 전 조회 1,618
10년 전 조회 1,772
10년 전 조회 1,682
10년 전 조회 1,449
10년 전 조회 1,446
10년 전 조회 1,402
10년 전 조회 1,394
10년 전 조회 1,496
10년 전 조회 1,414
10년 전 조회 1,368
10년 전 조회 1,423
10년 전 조회 1,779
10년 전 조회 2,239
10년 전 조회 1,817
10년 전 조회 1,610
10년 전 조회 1,484
10년 전 조회 1,446
10년 전 조회 1,466
10년 전 조회 1,426
10년 전 조회 1,444
10년 전 조회 1,455
10년 전 조회 1,622
10년 전 조회 1,517
10년 전 조회 2,268
10년 전 조회 1,796
10년 전 조회 1,547
10년 전 조회 1,639
10년 전 조회 1,859
10년 전 조회 1,541
10년 전 조회 1,746
10년 전 조회 1,571
10년 전 조회 1,699
10년 전 조회 1,534
10년 전 조회 1,484
10년 전 조회 1,479
10년 전 조회 1,537
10년 전 조회 1,513
10년 전 조회 1,568
10년 전 조회 1,579
10년 전 조회 1,565
10년 전 조회 1,701
10년 전 조회 1,704
10년 전 조회 1,504
10년 전 조회 1,803
10년 전 조회 2,125
10년 전 조회 1,588
10년 전 조회 1,842
10년 전 조회 1,808
10년 전 조회 1,661
10년 전 조회 1,626
10년 전 조회 1,585
10년 전 조회 1,684
10년 전 조회 1,436
10년 전 조회 1,514
10년 전 조회 1,731
10년 전 조회 1,554
10년 전 조회 1,507
10년 전 조회 1,497
10년 전 조회 1,516
10년 전 조회 1,534
10년 전 조회 1,517
10년 전 조회 1,550
10년 전 조회 1,511
10년 전 조회 1,666
10년 전 조회 1,490
10년 전 조회 1,504
10년 전 조회 1,614
10년 전 조회 2,314
10년 전 조회 1,568
10년 전 조회 1,548
10년 전 조회 1,624
10년 전 조회 1,523
10년 전 조회 1,713
10년 전 조회 1,624
10년 전 조회 1,532
10년 전 조회 1,530
10년 전 조회 1,568
10년 전 조회 1,572
10년 전 조회 1,496
10년 전 조회 1,447
10년 전 조회 1,430
10년 전 조회 1,470
10년 전 조회 1,872
10년 전 조회 1,484
10년 전 조회 1,598
10년 전 조회 1,533
10년 전 조회 1,768
10년 전 조회 1,593
10년 전 조회 1,502
10년 전 조회 1,533
10년 전 조회 1,566
10년 전 조회 1,699
10년 전 조회 1,621