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

· 10년 전 · 497

<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년 전 조회 523
10년 전 조회 465
10년 전 조회 476
10년 전 조회 480
10년 전 조회 440
10년 전 조회 445
10년 전 조회 658
10년 전 조회 869
10년 전 조회 677
10년 전 조회 472
10년 전 조회 481
10년 전 조회 442
10년 전 조회 460
10년 전 조회 560
10년 전 조회 498
10년 전 조회 409
10년 전 조회 462
10년 전 조회 848
10년 전 조회 1,305
10년 전 조회 871
10년 전 조회 674
10년 전 조회 644
10년 전 조회 507
10년 전 조회 489
10년 전 조회 514
10년 전 조회 485
10년 전 조회 497
10년 전 조회 529
10년 전 조회 658
10년 전 조회 559
10년 전 조회 1,301
10년 전 조회 858
10년 전 조회 571
10년 전 조회 649
10년 전 조회 913
10년 전 조회 632
10년 전 조회 763
10년 전 조회 601
10년 전 조회 707
10년 전 조회 537
10년 전 조회 517
10년 전 조회 510
10년 전 조회 566
10년 전 조회 526
10년 전 조회 583
10년 전 조회 579
10년 전 조회 569
10년 전 조회 729
10년 전 조회 734
10년 전 조회 498
10년 전 조회 802
10년 전 조회 1,161
10년 전 조회 606
10년 전 조회 845
10년 전 조회 838
10년 전 조회 675
10년 전 조회 603
10년 전 조회 594
10년 전 조회 690
10년 전 조회 463
10년 전 조회 496
10년 전 조회 712
10년 전 조회 542
10년 전 조회 504
10년 전 조회 491
10년 전 조회 506
10년 전 조회 510
10년 전 조회 484
10년 전 조회 502
10년 전 조회 527
10년 전 조회 619
10년 전 조회 459
10년 전 조회 484
10년 전 조회 565
10년 전 조회 1,314
10년 전 조회 520
10년 전 조회 512
10년 전 조회 644
10년 전 조회 528
10년 전 조회 710
10년 전 조회 631
10년 전 조회 517
10년 전 조회 517
10년 전 조회 571
10년 전 조회 565
10년 전 조회 459
10년 전 조회 455
10년 전 조회 414
10년 전 조회 468
10년 전 조회 866
10년 전 조회 467
10년 전 조회 585
10년 전 조회 498
10년 전 조회 706
10년 전 조회 512
10년 전 조회 434
10년 전 조회 480
10년 전 조회 497
10년 전 조회 628
10년 전 조회 565
🐛 버그신고