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

· 10년 전 · 1242

<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,194
10년 전 조회 1,154
10년 전 조회 1,178
10년 전 조회 1,183
10년 전 조회 1,237
10년 전 조회 1,158
10년 전 조회 1,377
10년 전 조회 1,545
10년 전 조회 1,435
10년 전 조회 1,199
10년 전 조회 1,196
10년 전 조회 1,154
10년 전 조회 1,162
10년 전 조회 1,273
10년 전 조회 1,205
10년 전 조회 1,139
10년 전 조회 1,196
10년 전 조회 1,548
10년 전 조회 2,002
10년 전 조회 1,587
10년 전 조회 1,407
10년 전 조회 1,368
10년 전 조회 1,207
10년 전 조회 1,202
10년 전 조회 1,219
10년 전 조회 1,181
10년 전 조회 1,198
10년 전 조회 1,222
10년 전 조회 1,376
10년 전 조회 1,303
10년 전 조회 2,022
10년 전 조회 1,559
10년 전 조회 1,292
10년 전 조회 1,381
10년 전 조회 1,640
10년 전 조회 1,320
10년 전 조회 1,497
10년 전 조회 1,341
10년 전 조회 1,443
10년 전 조회 1,291
10년 전 조회 1,255
10년 전 조회 1,252
10년 전 조회 1,288
10년 전 조회 1,281
10년 전 조회 1,312
10년 전 조회 1,343
10년 전 조회 1,306
10년 전 조회 1,467
10년 전 조회 1,461
10년 전 조회 1,243
10년 전 조회 1,549
10년 전 조회 1,904
10년 전 조회 1,342
10년 전 조회 1,602
10년 전 조회 1,560
10년 전 조회 1,407
10년 전 조회 1,373
10년 전 조회 1,332
10년 전 조회 1,442
10년 전 조회 1,184
10년 전 조회 1,263
10년 전 조회 1,481
10년 전 조회 1,298
10년 전 조회 1,298
10년 전 조회 1,258
10년 전 조회 1,289
10년 전 조회 1,269
10년 전 조회 1,261
10년 전 조회 1,287
10년 전 조회 1,257
10년 전 조회 1,421
10년 전 조회 1,241
10년 전 조회 1,243
10년 전 조회 1,322
10년 전 조회 2,069
10년 전 조회 1,293
10년 전 조회 1,290
10년 전 조회 1,382
10년 전 조회 1,288
10년 전 조회 1,442
10년 전 조회 1,374
10년 전 조회 1,292
10년 전 조회 1,292
10년 전 조회 1,342
10년 전 조회 1,319
10년 전 조회 1,242
10년 전 조회 1,199
10년 전 조회 1,170
10년 전 조회 1,201
10년 전 조회 1,590
10년 전 조회 1,245
10년 전 조회 1,344
10년 전 조회 1,297
10년 전 조회 1,513
10년 전 조회 1,329
10년 전 조회 1,272
10년 전 조회 1,278
10년 전 조회 1,313
10년 전 조회 1,434
10년 전 조회 1,366