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

· 10년 전 · 1261

<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,215
10년 전 조회 1,165
10년 전 조회 1,192
10년 전 조회 1,198
10년 전 조회 1,249
10년 전 조회 1,171
10년 전 조회 1,403
10년 전 조회 1,560
10년 전 조회 1,459
10년 전 조회 1,215
10년 전 조회 1,220
10년 전 조회 1,173
10년 전 조회 1,174
10년 전 조회 1,286
10년 전 조회 1,217
10년 전 조회 1,158
10년 전 조회 1,216
10년 전 조회 1,569
10년 전 조회 2,019
10년 전 조회 1,602
10년 전 조회 1,420
10년 전 조회 1,382
10년 전 조회 1,226
10년 전 조회 1,215
10년 전 조회 1,238
10년 전 조회 1,203
10년 전 조회 1,212
10년 전 조회 1,243
10년 전 조회 1,401
10년 전 조회 1,315
10년 전 조회 2,043
10년 전 조회 1,573
10년 전 조회 1,312
10년 전 조회 1,401
10년 전 조회 1,653
10년 전 조회 1,339
10년 전 조회 1,513
10년 전 조회 1,351
10년 전 조회 1,460
10년 전 조회 1,306
10년 전 조회 1,275
10년 전 조회 1,268
10년 전 조회 1,302
10년 전 조회 1,303
10년 전 조회 1,330
10년 전 조회 1,359
10년 전 조회 1,333
10년 전 조회 1,485
10년 전 조회 1,483
10년 전 조회 1,262
10년 전 조회 1,573
10년 전 조회 1,923
10년 전 조회 1,357
10년 전 조회 1,617
10년 전 조회 1,578
10년 전 조회 1,426
10년 전 조회 1,397
10년 전 조회 1,348
10년 전 조회 1,465
10년 전 조회 1,205
10년 전 조회 1,285
10년 전 조회 1,499
10년 전 조회 1,326
10년 전 조회 1,321
10년 전 조회 1,280
10년 전 조회 1,304
10년 전 조회 1,292
10년 전 조회 1,291
10년 전 조회 1,313
10년 전 조회 1,265
10년 전 조회 1,438
10년 전 조회 1,266
10년 전 조회 1,273
10년 전 조회 1,346
10년 전 조회 2,093
10년 전 조회 1,316
10년 전 조회 1,312
10년 전 조회 1,404
10년 전 조회 1,311
10년 전 조회 1,472
10년 전 조회 1,390
10년 전 조회 1,314
10년 전 조회 1,314
10년 전 조회 1,370
10년 전 조회 1,343
10년 전 조회 1,260
10년 전 조회 1,215
10년 전 조회 1,187
10년 전 조회 1,224
10년 전 조회 1,612
10년 전 조회 1,262
10년 전 조회 1,366
10년 전 조회 1,321
10년 전 조회 1,541
10년 전 조회 1,348
10년 전 조회 1,297
10년 전 조회 1,304
10년 전 조회 1,333
10년 전 조회 1,450
10년 전 조회 1,383