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

· 10년 전 · 429

<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년 전 조회 448
10년 전 조회 406
10년 전 조회 419
10년 전 조회 416
10년 전 조회 383
10년 전 조회 382
10년 전 조회 595
10년 전 조회 801
10년 전 조회 614
10년 전 조회 414
10년 전 조회 405
10년 전 조회 384
10년 전 조회 387
10년 전 조회 505
10년 전 조회 420
10년 전 조회 342
10년 전 조회 391
10년 전 조회 780
10년 전 조회 1,239
10년 전 조회 811
10년 전 조회 598
10년 전 조회 575
10년 전 조회 441
10년 전 조회 432
10년 전 조회 445
10년 전 조회 408
10년 전 조회 434
10년 전 조회 460
10년 전 조회 591
10년 전 조회 494
10년 전 조회 1,222
10년 전 조회 774
10년 전 조회 498
10년 전 조회 582
10년 전 조회 833
10년 전 조회 552
10년 전 조회 689
10년 전 조회 532
10년 전 조회 635
10년 전 조회 468
10년 전 조회 444
10년 전 조회 443
10년 전 조회 495
10년 전 조회 464
10년 전 조회 510
10년 전 조회 515
10년 전 조회 496
10년 전 조회 655
10년 전 조회 668
10년 전 조회 430
10년 전 조회 730
10년 전 조회 1,078
10년 전 조회 534
10년 전 조회 761
10년 전 조회 765
10년 전 조회 592
10년 전 조회 535
10년 전 조회 510
10년 전 조회 605
10년 전 조회 377
10년 전 조회 415
10년 전 조회 629
10년 전 조회 468
10년 전 조회 428
10년 전 조회 418
10년 전 조회 427
10년 전 조회 432
10년 전 조회 407
10년 전 조회 419
10년 전 조회 446
10년 전 조회 550
10년 전 조회 388
10년 전 조회 407
10년 전 조회 484
10년 전 조회 1,228
10년 전 조회 447
10년 전 조회 425
10년 전 조회 554
10년 전 조회 434
10년 전 조회 621
10년 전 조회 549
10년 전 조회 429
10년 전 조회 427
10년 전 조회 479
10년 전 조회 475
10년 전 조회 369
10년 전 조회 373
10년 전 조회 327
10년 전 조회 378
10년 전 조회 778
10년 전 조회 387
10년 전 조회 491
10년 전 조회 413
10년 전 조회 609
10년 전 조회 424
10년 전 조회 349
10년 전 조회 381
10년 전 조회 405
10년 전 조회 525
10년 전 조회 479
🐛 버그신고