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

· 10년 전 · 526

<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년 전 조회 547
10년 전 조회 485
10년 전 조회 500
10년 전 조회 502
10년 전 조회 463
10년 전 조회 472
10년 전 조회 680
10년 전 조회 890
10년 전 조회 695
10년 전 조회 501
10년 전 조회 504
10년 전 조회 458
10년 전 조회 483
10년 전 조회 581
10년 전 조회 518
10년 전 조회 434
10년 전 조회 483
10년 전 조회 877
10년 전 조회 1,327
10년 전 조회 897
10년 전 조회 695
10년 전 조회 668
10년 전 조회 530
10년 전 조회 519
10년 전 조회 539
10년 전 조회 510
10년 전 조회 527
10년 전 조회 551
10년 전 조회 680
10년 전 조회 589
10년 전 조회 1,323
10년 전 조회 879
10년 전 조회 599
10년 전 조회 673
10년 전 조회 937
10년 전 조회 653
10년 전 조회 784
10년 전 조회 627
10년 전 조회 734
10년 전 조회 564
10년 전 조회 543
10년 전 조회 540
10년 전 조회 591
10년 전 조회 548
10년 전 조회 606
10년 전 조회 609
10년 전 조회 591
10년 전 조회 750
10년 전 조회 762
10년 전 조회 527
10년 전 조회 829
10년 전 조회 1,183
10년 전 조회 633
10년 전 조회 867
10년 전 조회 862
10년 전 조회 696
10년 전 조회 629
10년 전 조회 613
10년 전 조회 714
10년 전 조회 487
10년 전 조회 522
10년 전 조회 739
10년 전 조회 569
10년 전 조회 532
10년 전 조회 515
10년 전 조회 524
10년 전 조회 535
10년 전 조회 515
10년 전 조회 532
10년 전 조회 552
10년 전 조회 647
10년 전 조회 482
10년 전 조회 507
10년 전 조회 594
10년 전 조회 1,343
10년 전 조회 546
10년 전 조회 542
10년 전 조회 669
10년 전 조회 555
10년 전 조회 740
10년 전 조회 654
10년 전 조회 541
10년 전 조회 544
10년 전 조회 599
10년 전 조회 588
10년 전 조회 484
10년 전 조회 481
10년 전 조회 449
10년 전 조회 492
10년 전 조회 888
10년 전 조회 499
10년 전 조회 615
10년 전 조회 531
10년 전 조회 733
10년 전 조회 538
10년 전 조회 464
10년 전 조회 510
10년 전 조회 526
10년 전 조회 663
10년 전 조회 595
🐛 버그신고