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

· 10년 전 · 364

<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년 전 조회 371
10년 전 조회 317
10년 전 조회 331
10년 전 조회 331
10년 전 조회 293
10년 전 조회 296
10년 전 조회 502
10년 전 조회 724
10년 전 조회 534
10년 전 조회 338
10년 전 조회 335
10년 전 조회 298
10년 전 조회 310
10년 전 조회 422
10년 전 조회 340
10년 전 조회 267
10년 전 조회 312
10년 전 조회 696
10년 전 조회 1,163
10년 전 조회 721
10년 전 조회 520
10년 전 조회 498
10년 전 조회 378
10년 전 조회 355
10년 전 조회 365
10년 전 조회 333
10년 전 조회 358
10년 전 조회 375
10년 전 조회 508
10년 전 조회 413
10년 전 조회 1,145
10년 전 조회 702
10년 전 조회 429
10년 전 조회 495
10년 전 조회 765
10년 전 조회 477
10년 전 조회 604
10년 전 조회 443
10년 전 조회 558
10년 전 조회 388
10년 전 조회 365
10년 전 조회 369
10년 전 조회 428
10년 전 조회 387
10년 전 조회 446
10년 전 조회 438
10년 전 조회 421
10년 전 조회 585
10년 전 조회 595
10년 전 조회 365
10년 전 조회 661
10년 전 조회 1,013
10년 전 조회 469
10년 전 조회 690
10년 전 조회 698
10년 전 조회 521
10년 전 조회 474
10년 전 조회 441
10년 전 조회 536
10년 전 조회 311
10년 전 조회 344
10년 전 조회 563
10년 전 조회 401
10년 전 조회 360
10년 전 조회 347
10년 전 조회 368
10년 전 조회 362
10년 전 조회 346
10년 전 조회 353
10년 전 조회 385
10년 전 조회 477
10년 전 조회 317
10년 전 조회 355
10년 전 조회 433
10년 전 조회 1,160
10년 전 조회 369
10년 전 조회 367
10년 전 조회 492
10년 전 조회 369
10년 전 조회 546
10년 전 조회 481
10년 전 조회 367
10년 전 조회 367
10년 전 조회 419
10년 전 조회 413
10년 전 조회 307
10년 전 조회 310
10년 전 조회 263
10년 전 조회 321
10년 전 조회 715
10년 전 조회 331
10년 전 조회 435
10년 전 조회 355
10년 전 조회 552
10년 전 조회 367
10년 전 조회 304
10년 전 조회 329
10년 전 조회 350
10년 전 조회 480
10년 전 조회 427
🐛 버그신고