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

· 10년 전 · 510

<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년 전 조회 533
10년 전 조회 475
10년 전 조회 486
10년 전 조회 490
10년 전 조회 449
10년 전 조회 456
10년 전 조회 668
10년 전 조회 882
10년 전 조회 686
10년 전 조회 490
10년 전 조회 491
10년 전 조회 449
10년 전 조회 471
10년 전 조회 573
10년 전 조회 506
10년 전 조회 421
10년 전 조회 470
10년 전 조회 862
10년 전 조회 1,317
10년 전 조회 886
10년 전 조회 682
10년 전 조회 655
10년 전 조회 520
10년 전 조회 501
10년 전 조회 532
10년 전 조회 497
10년 전 조회 510
10년 전 조회 539
10년 전 조회 667
10년 전 조회 570
10년 전 조회 1,308
10년 전 조회 865
10년 전 조회 581
10년 전 조회 659
10년 전 조회 925
10년 전 조회 644
10년 전 조회 771
10년 전 조회 610
10년 전 조회 715
10년 전 조회 544
10년 전 조회 534
10년 전 조회 524
10년 전 조회 576
10년 전 조회 533
10년 전 조회 594
10년 전 조회 590
10년 전 조회 583
10년 전 조회 738
10년 전 조회 742
10년 전 조회 511
10년 전 조회 814
10년 전 조회 1,174
10년 전 조회 617
10년 전 조회 850
10년 전 조회 850
10년 전 조회 681
10년 전 조회 619
10년 전 조회 599
10년 전 조회 697
10년 전 조회 471
10년 전 조회 504
10년 전 조회 721
10년 전 조회 555
10년 전 조회 520
10년 전 조회 498
10년 전 조회 514
10년 전 조회 522
10년 전 조회 495
10년 전 조회 513
10년 전 조회 537
10년 전 조회 634
10년 전 조회 469
10년 전 조회 493
10년 전 조회 579
10년 전 조회 1,330
10년 전 조회 531
10년 전 조회 525
10년 전 조회 659
10년 전 조회 544
10년 전 조회 726
10년 전 조회 642
10년 전 조회 532
10년 전 조회 532
10년 전 조회 582
10년 전 조회 577
10년 전 조회 471
10년 전 조회 471
10년 전 조회 429
10년 전 조회 481
10년 전 조회 878
10년 전 조회 480
10년 전 조회 601
10년 전 조회 516
10년 전 조회 717
10년 전 조회 524
10년 전 조회 448
10년 전 조회 496
10년 전 조회 513
10년 전 조회 647
10년 전 조회 576
🐛 버그신고