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

· 10년 전 · 567

<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>

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
10년 전 조회 596
10년 전 조회 534
10년 전 조회 543
10년 전 조회 551
10년 전 조회 506
10년 전 조회 520
10년 전 조회 722
10년 전 조회 910
10년 전 조회 744
10년 전 조회 548
10년 전 조회 549
10년 전 조회 507
10년 전 조회 526
10년 전 조회 626
10년 전 조회 554
10년 전 조회 479
10년 전 조회 523
10년 전 조회 918
10년 전 조회 1,367
10년 전 조회 915
10년 전 조회 742
10년 전 조회 711
10년 전 조회 568
10년 전 조회 566
10년 전 조회 582
10년 전 조회 553
10년 전 조회 563
10년 전 조회 598
10년 전 조회 722
10년 전 조회 640
10년 전 조회 1,370
10년 전 조회 928
10년 전 조회 647
10년 전 조회 725
10년 전 조회 951
10년 전 조회 690
10년 전 조회 835
10년 전 조회 666
10년 전 조회 785
10년 전 조회 613
10년 전 조회 595
10년 전 조회 593
10년 전 조회 632
10년 전 조회 592
10년 전 조회 659
10년 전 조회 664
10년 전 조회 643
10년 전 조회 797
10년 전 조회 802
10년 전 조회 568
10년 전 조회 865
10년 전 조회 1,221
10년 전 조회 680
10년 전 조회 911
10년 전 조회 899
10년 전 조회 743
10년 전 조회 681
10년 전 조회 656
10년 전 조회 754
10년 전 조회 529
10년 전 조회 558
10년 전 조회 785
10년 전 조회 623
10년 전 조회 573
10년 전 조회 554
10년 전 조회 569
10년 전 조회 588
10년 전 조회 562
10년 전 조회 572
10년 전 조회 597
10년 전 조회 696
10년 전 조회 530
10년 전 조회 556
10년 전 조회 643
10년 전 조회 1,369
10년 전 조회 588
10년 전 조회 586
10년 전 조회 702
10년 전 조회 602
10년 전 조회 771
10년 전 조회 690
10년 전 조회 579
10년 전 조회 580
10년 전 조회 643
10년 전 조회 622
10년 전 조회 525
10년 전 조회 512
10년 전 조회 483
10년 전 조회 525
10년 전 조회 930
10년 전 조회 511
10년 전 조회 656
10년 전 조회 555
10년 전 조회 771
10년 전 조회 585
10년 전 조회 481
10년 전 조회 545
10년 전 조회 569
10년 전 조회 700
10년 전 조회 636
🐛 버그신고