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

· 10년 전 · 485

<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년 전 조회 510
10년 전 조회 452
10년 전 조회 464
10년 전 조회 468
10년 전 조회 425
10년 전 조회 434
10년 전 조회 644
10년 전 조회 857
10년 전 조회 667
10년 전 조회 464
10년 전 조회 467
10년 전 조회 427
10년 전 조회 444
10년 전 조회 548
10년 전 조회 487
10년 전 조회 395
10년 전 조회 445
10년 전 조회 836
10년 전 조회 1,296
10년 전 조회 861
10년 전 조회 659
10년 전 조회 632
10년 전 조회 500
10년 전 조회 481
10년 전 조회 501
10년 전 조회 470
10년 전 조회 486
10년 전 조회 516
10년 전 조회 648
10년 전 조회 549
10년 전 조회 1,295
10년 전 조회 847
10년 전 조회 560
10년 전 조회 634
10년 전 조회 905
10년 전 조회 620
10년 전 조회 752
10년 전 조회 584
10년 전 조회 694
10년 전 조회 523
10년 전 조회 509
10년 전 조회 502
10년 전 조회 553
10년 전 조회 516
10년 전 조회 574
10년 전 조회 568
10년 전 조회 552
10년 전 조회 718
10년 전 조회 720
10년 전 조회 486
10년 전 조회 790
10년 전 조회 1,151
10년 전 조회 591
10년 전 조회 829
10년 전 조회 830
10년 전 조회 659
10년 전 조회 588
10년 전 조회 578
10년 전 조회 674
10년 전 조회 452
10년 전 조회 479
10년 전 조회 700
10년 전 조회 532
10년 전 조회 489
10년 전 조회 481
10년 전 조회 493
10년 전 조회 493
10년 전 조회 470
10년 전 조회 482
10년 전 조회 510
10년 전 조회 605
10년 전 조회 448
10년 전 조회 470
10년 전 조회 551
10년 전 조회 1,295
10년 전 조회 508
10년 전 조회 500
10년 전 조회 633
10년 전 조회 516
10년 전 조회 695
10년 전 조회 622
10년 전 조회 506
10년 전 조회 504
10년 전 조회 560
10년 전 조회 553
10년 전 조회 444
10년 전 조회 438
10년 전 조회 398
10년 전 조회 452
10년 전 조회 851
10년 전 조회 453
10년 전 조회 569
10년 전 조회 478
10년 전 조회 688
10년 전 조회 499
10년 전 조회 415
10년 전 조회 467
10년 전 조회 483
10년 전 조회 612
10년 전 조회 548
🐛 버그신고