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

· 10년 전 · 452

<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년 전 조회 479
10년 전 조회 424
10년 전 조회 441
10년 전 조회 440
10년 전 조회 396
10년 전 조회 409
10년 전 조회 611
10년 전 조회 822
10년 전 조회 638
10년 전 조회 436
10년 전 조회 432
10년 전 조회 401
10년 전 조회 414
10년 전 조회 522
10년 전 조회 448
10년 전 조회 361
10년 전 조회 412
10년 전 조회 805
10년 전 조회 1,265
10년 전 조회 829
10년 전 조회 630
10년 전 조회 600
10년 전 조회 461
10년 전 조회 457
10년 전 조회 470
10년 전 조회 437
10년 전 조회 454
10년 전 조회 480
10년 전 조회 612
10년 전 조회 520
10년 전 조회 1,250
10년 전 조회 803
10년 전 조회 527
10년 전 조회 601
10년 전 조회 856
10년 전 조회 579
10년 전 조회 714
10년 전 조회 551
10년 전 조회 661
10년 전 조회 491
10년 전 조회 476
10년 전 조회 473
10년 전 조회 523
10년 전 조회 482
10년 전 조회 539
10년 전 조회 534
10년 전 조회 521
10년 전 조회 677
10년 전 조회 692
10년 전 조회 453
10년 전 조회 758
10년 전 조회 1,108
10년 전 조회 557
10년 전 조회 786
10년 전 조회 791
10년 전 조회 620
10년 전 조회 558
10년 전 조회 540
10년 전 조회 637
10년 전 조회 410
10년 전 조회 440
10년 전 조회 652
10년 전 조회 497
10년 전 조회 449
10년 전 조회 442
10년 전 조회 462
10년 전 조회 457
10년 전 조회 439
10년 전 조회 440
10년 전 조회 472
10년 전 조회 575
10년 전 조회 414
10년 전 조회 433
10년 전 조회 511
10년 전 조회 1,252
10년 전 조회 475
10년 전 조회 460
10년 전 조회 585
10년 전 조회 474
10년 전 조회 650
10년 전 조회 581
10년 전 조회 460
10년 전 조회 462
10년 전 조회 512
10년 전 조회 507
10년 전 조회 400
10년 전 조회 400
10년 전 조회 364
10년 전 조회 407
10년 전 조회 809
10년 전 조회 409
10년 전 조회 525
10년 전 조회 440
10년 전 조회 639
10년 전 조회 454
10년 전 조회 374
10년 전 조회 410
10년 전 조회 439
10년 전 조회 558
10년 전 조회 508
🐛 버그신고