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

· 10년 전 · 1266

<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,216
10년 전 조회 1,167
10년 전 조회 1,194
10년 전 조회 1,202
10년 전 조회 1,251
10년 전 조회 1,177
10년 전 조회 1,408
10년 전 조회 1,561
10년 전 조회 1,463
10년 전 조회 1,215
10년 전 조회 1,223
10년 전 조회 1,174
10년 전 조회 1,177
10년 전 조회 1,288
10년 전 조회 1,219
10년 전 조회 1,161
10년 전 조회 1,220
10년 전 조회 1,572
10년 전 조회 2,021
10년 전 조회 1,604
10년 전 조회 1,423
10년 전 조회 1,383
10년 전 조회 1,228
10년 전 조회 1,224
10년 전 조회 1,240
10년 전 조회 1,206
10년 전 조회 1,215
10년 전 조회 1,246
10년 전 조회 1,401
10년 전 조회 1,317
10년 전 조회 2,046
10년 전 조회 1,576
10년 전 조회 1,318
10년 전 조회 1,402
10년 전 조회 1,653
10년 전 조회 1,340
10년 전 조회 1,514
10년 전 조회 1,351
10년 전 조회 1,460
10년 전 조회 1,306
10년 전 조회 1,279
10년 전 조회 1,271
10년 전 조회 1,304
10년 전 조회 1,304
10년 전 조회 1,332
10년 전 조회 1,361
10년 전 조회 1,334
10년 전 조회 1,486
10년 전 조회 1,485
10년 전 조회 1,267
10년 전 조회 1,574
10년 전 조회 1,925
10년 전 조회 1,360
10년 전 조회 1,619
10년 전 조회 1,580
10년 전 조회 1,430
10년 전 조회 1,397
10년 전 조회 1,351
10년 전 조회 1,468
10년 전 조회 1,211
10년 전 조회 1,286
10년 전 조회 1,500
10년 전 조회 1,327
10년 전 조회 1,324
10년 전 조회 1,283
10년 전 조회 1,307
10년 전 조회 1,295
10년 전 조회 1,295
10년 전 조회 1,317
10년 전 조회 1,267
10년 전 조회 1,439
10년 전 조회 1,270
10년 전 조회 1,275
10년 전 조회 1,347
10년 전 조회 2,097
10년 전 조회 1,320
10년 전 조회 1,312
10년 전 조회 1,409
10년 전 조회 1,315
10년 전 조회 1,478
10년 전 조회 1,393
10년 전 조회 1,317
10년 전 조회 1,316
10년 전 조회 1,371
10년 전 조회 1,345
10년 전 조회 1,261
10년 전 조회 1,220
10년 전 조회 1,190
10년 전 조회 1,227
10년 전 조회 1,613
10년 전 조회 1,266
10년 전 조회 1,369
10년 전 조회 1,324
10년 전 조회 1,544
10년 전 조회 1,349
10년 전 조회 1,301
10년 전 조회 1,305
10년 전 조회 1,334
10년 전 조회 1,453
10년 전 조회 1,386