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

· 10년 전 · 440

<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년 전 조회 461
10년 전 조회 417
10년 전 조회 428
10년 전 조회 423
10년 전 조회 389
10년 전 조회 393
10년 전 조회 605
10년 전 조회 807
10년 전 조회 623
10년 전 조회 423
10년 전 조회 419
10년 전 조회 393
10년 전 조회 399
10년 전 조회 515
10년 전 조회 432
10년 전 조회 353
10년 전 조회 400
10년 전 조회 790
10년 전 조회 1,250
10년 전 조회 817
10년 전 조회 614
10년 전 조회 589
10년 전 조회 451
10년 전 조회 444
10년 전 조회 456
10년 전 조회 424
10년 전 조회 443
10년 전 조회 470
10년 전 조회 605
10년 전 조회 506
10년 전 조회 1,234
10년 전 조회 791
10년 전 조회 512
10년 전 조회 593
10년 전 조회 842
10년 전 조회 562
10년 전 조회 703
10년 전 조회 546
10년 전 조회 649
10년 전 조회 480
10년 전 조회 457
10년 전 조회 456
10년 전 조회 507
10년 전 조회 471
10년 전 조회 521
10년 전 조회 525
10년 전 조회 506
10년 전 조회 667
10년 전 조회 677
10년 전 조회 441
10년 전 조회 742
10년 전 조회 1,089
10년 전 조회 543
10년 전 조회 774
10년 전 조회 774
10년 전 조회 607
10년 전 조회 544
10년 전 조회 521
10년 전 조회 618
10년 전 조회 389
10년 전 조회 424
10년 전 조회 639
10년 전 조회 482
10년 전 조회 441
10년 전 조회 431
10년 전 조회 443
10년 전 조회 441
10년 전 조회 418
10년 전 조회 428
10년 전 조회 453
10년 전 조회 562
10년 전 조회 403
10년 전 조회 415
10년 전 조회 494
10년 전 조회 1,238
10년 전 조회 462
10년 전 조회 437
10년 전 조회 565
10년 전 조회 450
10년 전 조회 630
10년 전 조회 562
10년 전 조회 438
10년 전 조회 446
10년 전 조회 491
10년 전 조회 489
10년 전 조회 380
10년 전 조회 388
10년 전 조회 338
10년 전 조회 385
10년 전 조회 792
10년 전 조회 395
10년 전 조회 501
10년 전 조회 422
10년 전 조회 618
10년 전 조회 433
10년 전 조회 357
10년 전 조회 390
10년 전 조회 417
10년 전 조회 536
10년 전 조회 492
🐛 버그신고