로컬에서 자바스크립트 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년 전 조회 2,617
10년 전 조회 2,498
10년 전 조회 2,045
10년 전 조회 2,621
10년 전 조회 1,679
10년 전 조회 2,084
10년 전 조회 2,325
10년 전 조회 1,836
10년 전 조회 1,764
10년 전 조회 1,728
10년 전 조회 1,596
10년 전 조회 1,774
10년 전 조회 1,778
10년 전 조회 2,289
10년 전 조회 1,694
10년 전 조회 1,798
10년 전 조회 1,761
10년 전 조회 2,697
10년 전 조회 1,823
10년 전 조회 1,706
10년 전 조회 1,799
10년 전 조회 1,820
10년 전 조회 1,896
10년 전 조회 1,698
10년 전 조회 1,787
10년 전 조회 2,121
10년 전 조회 2,064
10년 전 조회 2,036
10년 전 조회 1,600
10년 전 조회 1,698
10년 전 조회 1,652
10년 전 조회 1,612
10년 전 조회 1,821
10년 전 조회 1,614
10년 전 조회 1,915
10년 전 조회 1,593
10년 전 조회 1,926
10년 전 조회 1,629
10년 전 조회 1,856
10년 전 조회 2,442
10년 전 조회 1,762
10년 전 조회 1,817
10년 전 조회 1,696
10년 전 조회 2,741
10년 전 조회 2,370
10년 전 조회 1,983
10년 전 조회 1,885
10년 전 조회 1,697
10년 전 조회 1,823
10년 전 조회 2,515
10년 전 조회 2,560
10년 전 조회 3,207
10년 전 조회 2,302
10년 전 조회 2,193
10년 전 조회 2,684
10년 전 조회 1,819
10년 전 조회 1,794
10년 전 조회 1,780
10년 전 조회 1,781
10년 전 조회 1,847
10년 전 조회 1,969
10년 전 조회 2,224
10년 전 조회 1,781
10년 전 조회 2,204
10년 전 조회 2,177
10년 전 조회 1,927
10년 전 조회 1,812
10년 전 조회 1,788
10년 전 조회 1,820
10년 전 조회 1,794
10년 전 조회 1,782
10년 전 조회 2,134
10년 전 조회 1,711
10년 전 조회 1,808
10년 전 조회 1,968
10년 전 조회 1,848
10년 전 조회 2,584
10년 전 조회 2,383
10년 전 조회 1,850
10년 전 조회 1,793
10년 전 조회 2,088
10년 전 조회 1,811
10년 전 조회 1,729
10년 전 조회 1,807
10년 전 조회 1,718
10년 전 조회 1,756
10년 전 조회 1,723
10년 전 조회 1,953
10년 전 조회 3,819
10년 전 조회 1,923
10년 전 조회 1,689
10년 전 조회 1,730
10년 전 조회 1,773
10년 전 조회 3,081
10년 전 조회 2,996
10년 전 조회 2,374
10년 전 조회 2,664
10년 전 조회 2,814
10년 전 조회 2,768
10년 전 조회 2,138