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

· 10년 전 · 1213

<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,169
10년 전 조회 1,125
10년 전 조회 1,154
10년 전 조회 1,156
10년 전 조회 1,173
10년 전 조회 1,138
10년 전 조회 1,343
10년 전 조회 1,507
10년 전 조회 1,394
10년 전 조회 1,165
10년 전 조회 1,159
10년 전 조회 1,117
10년 전 조회 1,140
10년 전 조회 1,247
10년 전 조회 1,177
10년 전 조회 1,098
10년 전 조회 1,162
10년 전 조회 1,523
10년 전 조회 1,961
10년 전 조회 1,552
10년 전 조회 1,350
10년 전 조회 1,343
10년 전 조회 1,174
10년 전 조회 1,162
10년 전 조회 1,192
10년 전 조회 1,150
10년 전 조회 1,175
10년 전 조회 1,188
10년 전 조회 1,345
10년 전 조회 1,274
10년 전 조회 1,985
10년 전 조회 1,528
10년 전 조회 1,257
10년 전 조회 1,348
10년 전 조회 1,602
10년 전 조회 1,289
10년 전 조회 1,478
10년 전 조회 1,307
10년 전 조회 1,420
10년 전 조회 1,255
10년 전 조회 1,228
10년 전 조회 1,214
10년 전 조회 1,257
10년 전 조회 1,252
10년 전 조회 1,291
10년 전 조회 1,303
10년 전 조회 1,276
10년 전 조회 1,430
10년 전 조회 1,423
10년 전 조회 1,214
10년 전 조회 1,517
10년 전 조회 1,875
10년 전 조회 1,311
10년 전 조회 1,562
10년 전 조회 1,528
10년 전 조회 1,370
10년 전 조회 1,334
10년 전 조회 1,292
10년 전 조회 1,407
10년 전 조회 1,154
10년 전 조회 1,224
10년 전 조회 1,440
10년 전 조회 1,260
10년 전 조회 1,248
10년 전 조회 1,221
10년 전 조회 1,240
10년 전 조회 1,215
10년 전 조회 1,216
10년 전 조회 1,247
10년 전 조회 1,228
10년 전 조회 1,372
10년 전 조회 1,199
10년 전 조회 1,196
10년 전 조회 1,279
10년 전 조회 2,015
10년 전 조회 1,250
10년 전 조회 1,247
10년 전 조회 1,342
10년 전 조회 1,246
10년 전 조회 1,401
10년 전 조회 1,331
10년 전 조회 1,235
10년 전 조회 1,241
10년 전 조회 1,295
10년 전 조회 1,275
10년 전 조회 1,196
10년 전 조회 1,154
10년 전 조회 1,124
10년 전 조회 1,159
10년 전 조회 1,556
10년 전 조회 1,193
10년 전 조회 1,298
10년 전 조회 1,252
10년 전 조회 1,466
10년 전 조회 1,292
10년 전 조회 1,225
10년 전 조회 1,245
10년 전 조회 1,273
10년 전 조회 1,397
10년 전 조회 1,322