로컬에서 자바스크립트 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,949
10년 전 조회 1,822
10년 전 조회 1,374
10년 전 조회 1,963
10년 전 조회 1,015
10년 전 조회 1,464
10년 전 조회 1,672
10년 전 조회 1,233
10년 전 조회 1,202
10년 전 조회 1,103
10년 전 조회 949
10년 전 조회 1,137
10년 전 조회 1,115
10년 전 조회 1,654
10년 전 조회 1,058
10년 전 조회 1,122
10년 전 조회 1,123
10년 전 조회 2,031
10년 전 조회 1,145
10년 전 조회 1,050
10년 전 조회 1,146
10년 전 조회 1,171
10년 전 조회 1,273
10년 전 조회 1,053
10년 전 조회 1,124
10년 전 조회 1,471
10년 전 조회 1,425
10년 전 조회 1,412
10년 전 조회 951
10년 전 조회 1,062
10년 전 조회 1,037
10년 전 조회 978
10년 전 조회 1,201
10년 전 조회 974
10년 전 조회 1,302
10년 전 조회 961
10년 전 조회 1,277
10년 전 조회 973
10년 전 조회 1,224
10년 전 조회 1,781
10년 전 조회 1,124
10년 전 조회 1,181
10년 전 조회 988
10년 전 조회 2,096
10년 전 조회 1,707
10년 전 조회 1,301
10년 전 조회 1,237
10년 전 조회 1,016
10년 전 조회 1,159
10년 전 조회 1,872
10년 전 조회 1,881
10년 전 조회 2,532
10년 전 조회 1,731
10년 전 조회 1,511
10년 전 조회 2,032
10년 전 조회 1,151
10년 전 조회 1,118
10년 전 조회 1,098
10년 전 조회 1,107
10년 전 조회 1,178
10년 전 조회 1,292
10년 전 조회 1,527
10년 전 조회 1,058
10년 전 조회 1,565
10년 전 조회 1,594
10년 전 조회 1,256
10년 전 조회 1,137
10년 전 조회 1,135
10년 전 조회 1,153
10년 전 조회 1,137
10년 전 조회 1,136
10년 전 조회 1,468
10년 전 조회 1,068
10년 전 조회 1,142
10년 전 조회 1,326
10년 전 조회 1,223
10년 전 조회 1,953
10년 전 조회 1,793
10년 전 조회 1,214
10년 전 조회 1,167
10년 전 조회 1,471
10년 전 조회 1,219
10년 전 조회 1,104
10년 전 조회 1,164
10년 전 조회 1,123
10년 전 조회 1,145
10년 전 조회 1,094
10년 전 조회 1,344
10년 전 조회 3,232
10년 전 조회 1,329
10년 전 조회 1,057
10년 전 조회 1,108
10년 전 조회 1,136
10년 전 조회 2,464
10년 전 조회 2,353
10년 전 조회 1,765
10년 전 조회 2,060
10년 전 조회 2,178
10년 전 조회 2,151
10년 전 조회 1,512