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

· 10년 전 · 555

<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년 전 조회 576
10년 전 조회 511
10년 전 조회 530
10년 전 조회 527
10년 전 조회 491
10년 전 조회 501
10년 전 조회 702
10년 전 조회 905
10년 전 조회 732
10년 전 조회 529
10년 전 조회 533
10년 전 조회 490
10년 전 조회 514
10년 전 조회 612
10년 전 조회 537
10년 전 조회 464
10년 전 조회 506
10년 전 조회 901
10년 전 조회 1,353
10년 전 조회 910
10년 전 조회 726
10년 전 조회 694
10년 전 조회 555
10년 전 조회 543
10년 전 조회 565
10년 전 조회 538
10년 전 조회 550
10년 전 조회 578
10년 전 조회 706
10년 전 조회 623
10년 전 조회 1,350
10년 전 조회 906
10년 전 조회 625
10년 전 조회 707
10년 전 조회 947
10년 전 조회 679
10년 전 조회 818
10년 전 조회 653
10년 전 조회 763
10년 전 조회 598
10년 전 조회 576
10년 전 조회 573
10년 전 조회 621
10년 전 조회 576
10년 전 조회 641
10년 전 조회 643
10년 전 조회 622
10년 전 조회 779
10년 전 조회 791
10년 전 조회 556
10년 전 조회 856
10년 전 조회 1,207
10년 전 조회 661
10년 전 조회 895
10년 전 조회 886
10년 전 조회 728
10년 전 조회 663
10년 전 조회 640
10년 전 조회 741
10년 전 조회 513
10년 전 조회 545
10년 전 조회 764
10년 전 조회 603
10년 전 조회 554
10년 전 조회 538
10년 전 조회 555
10년 전 조회 571
10년 전 조회 545
10년 전 조회 560
10년 전 조회 576
10년 전 조회 681
10년 전 조회 510
10년 전 조회 539
10년 전 조회 625
10년 전 조회 1,357
10년 전 조회 573
10년 전 조회 571
10년 전 조회 690
10년 전 조회 584
10년 전 조회 763
10년 전 조회 674
10년 전 조회 566
10년 전 조회 573
10년 전 조회 624
10년 전 조회 611
10년 전 조회 509
10년 전 조회 503
10년 전 조회 469
10년 전 조회 515
10년 전 조회 916
10년 전 조회 510
10년 전 조회 638
10년 전 조회 542
10년 전 조회 756
10년 전 조회 569
10년 전 조회 475
10년 전 조회 534
10년 전 조회 553
10년 전 조회 691
10년 전 조회 623
🐛 버그신고