로컬에서 자바스크립트 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,310
10년 전 조회 1,201
10년 전 조회 742
10년 전 조회 1,349
10년 전 조회 393
10년 전 조회 832
10년 전 조회 1,044
10년 전 조회 499
10년 전 조회 446
10년 전 조회 448
10년 전 조회 298
10년 전 조회 448
10년 전 조회 469
10년 전 조회 996
10년 전 조회 397
10년 전 조회 475
10년 전 조회 454
10년 전 조회 1,379
10년 전 조회 480
10년 전 조회 339
10년 전 조회 492
10년 전 조회 512
10년 전 조회 585
10년 전 조회 384
10년 전 조회 440
10년 전 조회 841
10년 전 조회 773
10년 전 조회 750
10년 전 조회 306
10년 전 조회 392
10년 전 조회 393
10년 전 조회 334
10년 전 조회 603
10년 전 조회 325
10년 전 조회 664
10년 전 조회 323
10년 전 조회 623
10년 전 조회 322
10년 전 조회 547
10년 전 조회 1,116
10년 전 조회 440
10년 전 조회 458
10년 전 조회 326
10년 전 조회 1,389
10년 전 조회 1,029
10년 전 조회 618
10년 전 조회 576
10년 전 조회 393
10년 전 조회 511
10년 전 조회 1,172
10년 전 조회 1,209
10년 전 조회 1,878
10년 전 조회 958
10년 전 조회 840
10년 전 조회 1,340
10년 전 조회 458
10년 전 조회 429
10년 전 조회 432
10년 전 조회 417
10년 전 조회 499
10년 전 조회 627
10년 전 조회 859
10년 전 조회 395
10년 전 조회 920
10년 전 조회 786
10년 전 조회 600
10년 전 조회 460
10년 전 조회 430
10년 전 조회 495
10년 전 조회 448
10년 전 조회 464
10년 전 조회 793
10년 전 조회 393
10년 전 조회 484
10년 전 조회 649
10년 전 조회 565
10년 전 조회 1,277
10년 전 조회 1,087
10년 전 조회 550
10년 전 조회 466
10년 전 조회 798
10년 전 조회 523
10년 전 조회 428
10년 전 조회 488
10년 전 조회 427
10년 전 조회 473
10년 전 조회 414
10년 전 조회 652
10년 전 조회 2,500
10년 전 조회 629
10년 전 조회 361
10년 전 조회 412
10년 전 조회 442
10년 전 조회 1,746
10년 전 조회 1,677
10년 전 조회 1,062
10년 전 조회 1,356
10년 전 조회 1,486
10년 전 조회 1,441
10년 전 조회 831
🐛 버그신고