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

· 10년 전 · 367

<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년 전 조회 372
10년 전 조회 319
10년 전 조회 332
10년 전 조회 334
10년 전 조회 297
10년 전 조회 298
10년 전 조회 506
10년 전 조회 728
10년 전 조회 534
10년 전 조회 341
10년 전 조회 336
10년 전 조회 300
10년 전 조회 311
10년 전 조회 423
10년 전 조회 342
10년 전 조회 269
10년 전 조회 313
10년 전 조회 700
10년 전 조회 1,166
10년 전 조회 727
10년 전 조회 524
10년 전 조회 502
10년 전 조회 383
10년 전 조회 359
10년 전 조회 370
10년 전 조회 337
10년 전 조회 361
10년 전 조회 379
10년 전 조회 511
10년 전 조회 419
10년 전 조회 1,147
10년 전 조회 702
10년 전 조회 431
10년 전 조회 499
10년 전 조회 770
10년 전 조회 481
10년 전 조회 607
10년 전 조회 445
10년 전 조회 560
10년 전 조회 391
10년 전 조회 367
10년 전 조회 373
10년 전 조회 433
10년 전 조회 390
10년 전 조회 448
10년 전 조회 442
10년 전 조회 424
10년 전 조회 590
10년 전 조회 601
10년 전 조회 368
10년 전 조회 666
10년 전 조회 1,016
10년 전 조회 472
10년 전 조회 694
10년 전 조회 702
10년 전 조회 524
10년 전 조회 477
10년 전 조회 442
10년 전 조회 541
10년 전 조회 316
10년 전 조회 346
10년 전 조회 566
10년 전 조회 404
10년 전 조회 362
10년 전 조회 350
10년 전 조회 371
10년 전 조회 366
10년 전 조회 349
10년 전 조회 356
10년 전 조회 387
10년 전 조회 479
10년 전 조회 320
10년 전 조회 359
10년 전 조회 436
10년 전 조회 1,162
10년 전 조회 372
10년 전 조회 369
10년 전 조회 494
10년 전 조회 371
10년 전 조회 547
10년 전 조회 486
10년 전 조회 370
10년 전 조회 367
10년 전 조회 420
10년 전 조회 418
10년 전 조회 309
10년 전 조회 312
10년 전 조회 266
10년 전 조회 322
10년 전 조회 715
10년 전 조회 334
10년 전 조회 438
10년 전 조회 358
10년 전 조회 554
10년 전 조회 368
10년 전 조회 304
10년 전 조회 333
10년 전 조회 351
10년 전 조회 481
10년 전 조회 429
🐛 버그신고