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

· 10년 전 · 1462

<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년 전 조회 1,509
10년 전 조회 1,406
10년 전 조회 1,364
10년 전 조회 1,383
10년 전 조회 1,399
10년 전 조회 1,441
10년 전 조회 1,372
10년 전 조회 1,593
10년 전 조회 1,744
10년 전 조회 1,650
10년 전 조회 1,417
10년 전 조회 1,411
10년 전 조회 1,367
10년 전 조회 1,360
10년 전 조회 1,466
10년 전 조회 1,376
10년 전 조회 1,334
10년 전 조회 1,399
10년 전 조회 1,738
10년 전 조회 2,215
10년 전 조회 1,772
10년 전 조회 1,575
10년 전 조회 1,448
10년 전 조회 1,417
10년 전 조회 1,432
10년 전 조회 1,394
10년 전 조회 1,412
10년 전 조회 1,426
10년 전 조회 1,597
10년 전 조회 1,487
10년 전 조회 2,230
10년 전 조회 1,770
10년 전 조회 1,510
10년 전 조회 1,604
10년 전 조회 1,828
10년 전 조회 1,504
10년 전 조회 1,708
10년 전 조회 1,542
10년 전 조회 1,660
10년 전 조회 1,501
10년 전 조회 1,458
10년 전 조회 1,453
10년 전 조회 1,500
10년 전 조회 1,485
10년 전 조회 1,535
10년 전 조회 1,552
10년 전 조회 1,530
10년 전 조회 1,669
10년 전 조회 1,669
10년 전 조회 1,463
10년 전 조회 1,779
10년 전 조회 2,098
10년 전 조회 1,560
10년 전 조회 1,812
10년 전 조회 1,778
10년 전 조회 1,626
10년 전 조회 1,600
10년 전 조회 1,545
10년 전 조회 1,656
10년 전 조회 1,405
10년 전 조회 1,478
10년 전 조회 1,695
10년 전 조회 1,520
10년 전 조회 1,481
10년 전 조회 1,465
10년 전 조회 1,490
10년 전 조회 1,503
10년 전 조회 1,492
10년 전 조회 1,521
10년 전 조회 1,477
10년 전 조회 1,638
10년 전 조회 1,459
10년 전 조회 1,482
10년 전 조회 1,586
10년 전 조회 2,285
10년 전 조회 1,540
10년 전 조회 1,509
10년 전 조회 1,592
10년 전 조회 1,503
10년 전 조회 1,689
10년 전 조회 1,597
10년 전 조회 1,501
10년 전 조회 1,500
10년 전 조회 1,537
10년 전 조회 1,535
10년 전 조회 1,468
10년 전 조회 1,421
10년 전 조회 1,402
10년 전 조회 1,443
10년 전 조회 1,843
10년 전 조회 1,464
10년 전 조회 1,563
10년 전 조회 1,506
10년 전 조회 1,744
10년 전 조회 1,566
10년 전 조회 1,483
10년 전 조회 1,512
10년 전 조회 1,542
10년 전 조회 1,668
10년 전 조회 1,596