로컬에서 자바스크립트 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,488
10년 전 조회 1,378
10년 전 조회 922
10년 전 조회 1,529
10년 전 조회 572
10년 전 조회 1,025
10년 전 조회 1,230
10년 전 조회 682
10년 전 조회 623
10년 전 조회 619
10년 전 조회 471
10년 전 조회 649
10년 전 조회 644
10년 전 조회 1,180
10년 전 조회 591
10년 전 조회 666
10년 전 조회 639
10년 전 조회 1,560
10년 전 조회 666
10년 전 조회 524
10년 전 조회 684
10년 전 조회 683
10년 전 조회 771
10년 전 조회 555
10년 전 조회 634
10년 전 조회 1,016
10년 전 조회 956
10년 전 조회 934
10년 전 조회 479
10년 전 조회 579
10년 전 조회 580
10년 전 조회 517
10년 전 조회 764
10년 전 조회 522
10년 전 조회 836
10년 전 조회 502
10년 전 조회 817
10년 전 조회 508
10년 전 조회 739
10년 전 조회 1,299
10년 전 조회 616
10년 전 조회 652
10년 전 조회 496
10년 전 조회 1,574
10년 전 조회 1,205
10년 전 조회 810
10년 전 조회 751
10년 전 조회 551
10년 전 조회 668
10년 전 조회 1,346
10년 전 조회 1,389
10년 전 조회 2,055
10년 전 조회 1,126
10년 전 조회 1,018
10년 전 조회 1,521
10년 전 조회 642
10년 전 조회 611
10년 전 조회 604
10년 전 조회 594
10년 전 조회 683
10년 전 조회 799
10년 전 조회 1,032
10년 전 조회 565
10년 전 조회 1,100
10년 전 조회 971
10년 전 조회 769
10년 전 조회 650
10년 전 조회 625
10년 전 조회 678
10년 전 조회 624
10년 전 조회 651
10년 전 조회 988
10년 전 조회 573
10년 전 조회 668
10년 전 조회 831
10년 전 조회 740
10년 전 조회 1,457
10년 전 조회 1,276
10년 전 조회 734
10년 전 조회 652
10년 전 조회 984
10년 전 조회 714
10년 전 조회 615
10년 전 조회 668
10년 전 조회 609
10년 전 조회 656
10년 전 조회 581
10년 전 조회 836
10년 전 조회 2,683
10년 전 조회 809
10년 전 조회 538
10년 전 조회 585
10년 전 조회 626
10년 전 조회 1,938
10년 전 조회 1,850
10년 전 조회 1,240
10년 전 조회 1,543
10년 전 조회 1,674
10년 전 조회 1,637
10년 전 조회 1,007
🐛 버그신고