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

· 10년 전 · 500

<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년 전 조회 525
10년 전 조회 470
10년 전 조회 478
10년 전 조회 482
10년 전 조회 441
10년 전 조회 449
10년 전 조회 661
10년 전 조회 871
10년 전 조회 682
10년 전 조회 478
10년 전 조회 482
10년 전 조회 445
10년 전 조회 461
10년 전 조회 564
10년 전 조회 499
10년 전 조회 414
10년 전 조회 466
10년 전 조회 851
10년 전 조회 1,308
10년 전 조회 874
10년 전 조회 678
10년 전 조회 646
10년 전 조회 513
10년 전 조회 492
10년 전 조회 517
10년 전 조회 486
10년 전 조회 502
10년 전 조회 531
10년 전 조회 660
10년 전 조회 563
10년 전 조회 1,302
10년 전 조회 861
10년 전 조회 573
10년 전 조회 651
10년 전 조회 916
10년 전 조회 634
10년 전 조회 766
10년 전 조회 602
10년 전 조회 709
10년 전 조회 538
10년 전 조회 522
10년 전 조회 518
10년 전 조회 570
10년 전 조회 529
10년 전 조회 586
10년 전 조회 583
10년 전 조회 573
10년 전 조회 732
10년 전 조회 737
10년 전 조회 501
10년 전 조회 807
10년 전 조회 1,165
10년 전 조회 607
10년 전 조회 846
10년 전 조회 842
10년 전 조회 676
10년 전 조회 609
10년 전 조회 595
10년 전 조회 694
10년 전 조회 465
10년 전 조회 499
10년 전 조회 715
10년 전 조회 547
10년 전 조회 512
10년 전 조회 493
10년 전 조회 509
10년 전 조회 513
10년 전 조회 489
10년 전 조회 505
10년 전 조회 530
10년 전 조회 624
10년 전 조회 463
10년 전 조회 486
10년 전 조회 569
10년 전 조회 1,317
10년 전 조회 526
10년 전 조회 519
10년 전 조회 652
10년 전 조회 531
10년 전 조회 716
10년 전 조회 634
10년 전 조회 523
10년 전 조회 521
10년 전 조회 573
10년 전 조회 566
10년 전 조회 463
10년 전 조회 461
10년 전 조회 419
10년 전 조회 473
10년 전 조회 871
10년 전 조회 470
10년 전 조회 591
10년 전 조회 502
10년 전 조회 709
10년 전 조회 516
10년 전 조회 436
10년 전 조회 487
10년 전 조회 505
10년 전 조회 635
10년 전 조회 567
🐛 버그신고