로컬에서 자바스크립트 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,338
10년 전 조회 1,233
10년 전 조회 770
10년 전 조회 1,376
10년 전 조회 424
10년 전 조회 865
10년 전 조회 1,074
10년 전 조회 528
10년 전 조회 478
10년 전 조회 474
10년 전 조회 327
10년 전 조회 483
10년 전 조회 495
10년 전 조회 1,022
10년 전 조회 428
10년 전 조회 503
10년 전 조회 483
10년 전 조회 1,408
10년 전 조회 509
10년 전 조회 379
10년 전 조회 518
10년 전 조회 544
10년 전 조회 609
10년 전 조회 413
10년 전 조회 467
10년 전 조회 865
10년 전 조회 795
10년 전 조회 774
10년 전 조회 333
10년 전 조회 413
10년 전 조회 415
10년 전 조회 355
10년 전 조회 623
10년 전 조회 343
10년 전 조회 687
10년 전 조회 346
10년 전 조회 642
10년 전 조회 338
10년 전 조회 564
10년 전 조회 1,140
10년 전 조회 454
10년 전 조회 474
10년 전 조회 345
10년 전 조회 1,403
10년 전 조회 1,046
10년 전 조회 639
10년 전 조회 593
10년 전 조회 407
10년 전 조회 528
10년 전 조회 1,189
10년 전 조회 1,223
10년 전 조회 1,891
10년 전 조회 975
10년 전 조회 849
10년 전 조회 1,357
10년 전 조회 475
10년 전 조회 447
10년 전 조회 444
10년 전 조회 429
10년 전 조회 516
10년 전 조회 638
10년 전 조회 872
10년 전 조회 413
10년 전 조회 940
10년 전 조회 804
10년 전 조회 615
10년 전 조회 479
10년 전 조회 447
10년 전 조회 509
10년 전 조회 461
10년 전 조회 481
10년 전 조회 811
10년 전 조회 405
10년 전 조회 500
10년 전 조회 661
10년 전 조회 575
10년 전 조회 1,291
10년 전 조회 1,100
10년 전 조회 561
10년 전 조회 473
10년 전 조회 813
10년 전 조회 535
10년 전 조회 441
10년 전 조회 500
10년 전 조회 438
10년 전 조회 483
10년 전 조회 422
10년 전 조회 658
10년 전 조회 2,508
10년 전 조회 641
10년 전 조회 370
10년 전 조회 417
10년 전 조회 452
10년 전 조회 1,757
10년 전 조회 1,682
10년 전 조회 1,069
10년 전 조회 1,362
10년 전 조회 1,496
10년 전 조회 1,449
10년 전 조회 838
🐛 버그신고