로컬에서 자바스크립트 HTML 소스 가져오기

<html> 

<head> 

<title>::: 노글스 :::</title> 

</head> 

<body> 

<input type=button onClick=chk() value="chk"> 

결과 

 

<script> 

var sHttp = new ActiveXObject("Microsoft.xmlhttp"); 

 

function httpGet(szURL) { 

  sHttp.open("get",szURL,false); 

  sHttp.setRequestHeader( "Content-type:", "application/x-www-form-urlencoded"); 

sHttp.setRequestHeader("Content-Encoding:", "euc-kr"); 

 

 

  sHttp.onreadystatechange = onRetriveComplete; 

  try{ 

  sHttp.send("code=tnt2"); 

  } 

  catch(e) { 

      return ("Not exist"); 

  } 

 

  if (sHttp.status > 200) { 

  return("not exist<br>"); 

  } else 

 

 

  return(sHttp.responseText); 

 

 

function onRetriveComplete() { 

  sHttp.onreadystatechange = noop; //re-entrant gate 

  if (sHttp.readyState == 4) { 

  } 

 

function noop() { 

  return false; 

 

function chk() { 

 

  getData=httpGet("http://www.phpschool.com/bbs2/inc_board.html"); 

 

  document.noglsForm.test.value=getData; 

 

</script> 

 

<form name=noglsForm> 

<textarea name=test rows=200 cols=200></textarea> 

</form> 

</body> 

</html> 


|

댓글 1개

혀니천사 님, 암것도 안 올라 오네요. ^^;
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
10년 전 조회 1,308
10년 전 조회 1,201
10년 전 조회 741
10년 전 조회 1,349
10년 전 조회 393
10년 전 조회 830
10년 전 조회 1,042
10년 전 조회 498
10년 전 조회 446
10년 전 조회 447
10년 전 조회 298
10년 전 조회 448
10년 전 조회 469
10년 전 조회 996
10년 전 조회 397
10년 전 조회 473
10년 전 조회 452
10년 전 조회 1,376
10년 전 조회 480
10년 전 조회 339
10년 전 조회 492
10년 전 조회 512
10년 전 조회 585
10년 전 조회 384
10년 전 조회 439
10년 전 조회 841
10년 전 조회 772
10년 전 조회 749
10년 전 조회 306
10년 전 조회 392
10년 전 조회 393
10년 전 조회 334
10년 전 조회 602
10년 전 조회 325
10년 전 조회 664
10년 전 조회 323
10년 전 조회 620
10년 전 조회 322
10년 전 조회 547
10년 전 조회 1,114
10년 전 조회 440
10년 전 조회 458
10년 전 조회 326
10년 전 조회 1,389
10년 전 조회 1,027
10년 전 조회 618
10년 전 조회 576
10년 전 조회 393
10년 전 조회 511
10년 전 조회 1,170
10년 전 조회 1,209
10년 전 조회 1,878
10년 전 조회 958
10년 전 조회 840
10년 전 조회 1,339
10년 전 조회 457
10년 전 조회 429
10년 전 조회 431
10년 전 조회 417
10년 전 조회 497
10년 전 조회 627
10년 전 조회 859
10년 전 조회 395
10년 전 조회 920
10년 전 조회 785
10년 전 조회 600
10년 전 조회 459
10년 전 조회 429
10년 전 조회 494
10년 전 조회 448
10년 전 조회 462
10년 전 조회 792
10년 전 조회 393
10년 전 조회 484
10년 전 조회 648
10년 전 조회 565
10년 전 조회 1,277
10년 전 조회 1,086
10년 전 조회 550
10년 전 조회 465
10년 전 조회 797
10년 전 조회 522
10년 전 조회 428
10년 전 조회 488
10년 전 조회 426
10년 전 조회 473
10년 전 조회 414
10년 전 조회 652
10년 전 조회 2,500
10년 전 조회 627
10년 전 조회 359
10년 전 조회 411
10년 전 조회 442
10년 전 조회 1,745
10년 전 조회 1,676
10년 전 조회 1,062
10년 전 조회 1,356
10년 전 조회 1,485
10년 전 조회 1,441
10년 전 조회 829
🐛 버그신고