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

· 10년 전 · 540

<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년 전 조회 560
10년 전 조회 498
10년 전 조회 513
10년 전 조회 514
10년 전 조회 476
10년 전 조회 490
10년 전 조회 689
10년 전 조회 897
10년 전 조회 712
10년 전 조회 513
10년 전 조회 515
10년 전 조회 471
10년 전 조회 499
10년 전 조회 601
10년 전 조회 525
10년 전 조회 444
10년 전 조회 494
10년 전 조회 887
10년 전 조회 1,339
10년 전 조회 906
10년 전 조회 710
10년 전 조회 678
10년 전 조회 542
10년 전 조회 529
10년 전 조회 551
10년 전 조회 522
10년 전 조회 536
10년 전 조회 566
10년 전 조회 692
10년 전 조회 606
10년 전 조회 1,336
10년 전 조회 890
10년 전 조회 610
10년 전 조회 686
10년 전 조회 943
10년 전 조회 663
10년 전 조회 799
10년 전 조회 638
10년 전 조회 750
10년 전 조회 584
10년 전 조회 559
10년 전 조회 558
10년 전 조회 604
10년 전 조회 561
10년 전 조회 628
10년 전 조회 627
10년 전 조회 604
10년 전 조회 764
10년 전 조회 775
10년 전 조회 541
10년 전 조회 841
10년 전 조회 1,192
10년 전 조회 647
10년 전 조회 880
10년 전 조회 875
10년 전 조회 713
10년 전 조회 651
10년 전 조회 628
10년 전 조회 728
10년 전 조회 499
10년 전 조회 530
10년 전 조회 748
10년 전 조회 583
10년 전 조회 541
10년 전 조회 524
10년 전 조회 540
10년 전 조회 550
10년 전 조회 529
10년 전 조회 544
10년 전 조회 566
10년 전 조회 667
10년 전 조회 494
10년 전 조회 524
10년 전 조회 606
10년 전 조회 1,349
10년 전 조회 556
10년 전 조회 552
10년 전 조회 679
10년 전 조회 568
10년 전 조회 750
10년 전 조회 663
10년 전 조회 554
10년 전 조회 554
10년 전 조회 613
10년 전 조회 597
10년 전 조회 496
10년 전 조회 494
10년 전 조회 461
10년 전 조회 501
10년 전 조회 901
10년 전 조회 508
10년 전 조회 625
10년 전 조회 536
10년 전 조회 741
10년 전 조회 555
10년 전 조회 471
10년 전 조회 522
10년 전 조회 540
10년 전 조회 678
10년 전 조회 605
🐛 버그신고