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

· 10년 전 · 513

<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년 전 조회 538
10년 전 조회 477
10년 전 조회 490
10년 전 조회 492
10년 전 조회 451
10년 전 조회 459
10년 전 조회 671
10년 전 조회 886
10년 전 조회 690
10년 전 조회 493
10년 전 조회 495
10년 전 조회 452
10년 전 조회 474
10년 전 조회 575
10년 전 조회 508
10년 전 조회 423
10년 전 조회 472
10년 전 조회 863
10년 전 조회 1,318
10년 전 조회 888
10년 전 조회 685
10년 전 조회 655
10년 전 조회 524
10년 전 조회 503
10년 전 조회 532
10년 전 조회 500
10년 전 조회 513
10년 전 조회 542
10년 전 조회 669
10년 전 조회 578
10년 전 조회 1,309
10년 전 조회 871
10년 전 조회 585
10년 전 조회 663
10년 전 조회 926
10년 전 조회 647
10년 전 조회 774
10년 전 조회 614
10년 전 조회 718
10년 전 조회 548
10년 전 조회 538
10년 전 조회 527
10년 전 조회 578
10년 전 조회 537
10년 전 조회 598
10년 전 조회 595
10년 전 조회 585
10년 전 조회 742
10년 전 조회 747
10년 전 조회 514
10년 전 조회 819
10년 전 조회 1,175
10년 전 조회 620
10년 전 조회 854
10년 전 조회 854
10년 전 조회 684
10년 전 조회 620
10년 전 조회 603
10년 전 조회 698
10년 전 조회 475
10년 전 조회 509
10년 전 조회 723
10년 전 조회 560
10년 전 조회 522
10년 전 조회 504
10년 전 조회 515
10년 전 조회 525
10년 전 조회 500
10년 전 조회 517
10년 전 조회 539
10년 전 조회 638
10년 전 조회 475
10년 전 조회 493
10년 전 조회 582
10년 전 조회 1,333
10년 전 조회 534
10년 전 조회 528
10년 전 조회 661
10년 전 조회 548
10년 전 조회 729
10년 전 조회 644
10년 전 조회 537
10년 전 조회 535
10년 전 조회 587
10년 전 조회 579
10년 전 조회 474
10년 전 조회 473
10년 전 조회 434
10년 전 조회 483
10년 전 조회 879
10년 전 조회 486
10년 전 조회 605
10년 전 조회 518
10년 전 조회 722
10년 전 조회 528
10년 전 조회 455
10년 전 조회 499
10년 전 조회 517
10년 전 조회 649
10년 전 조회 579
🐛 버그신고