로컬에서 자바스크립트 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,965
10년 전 조회 1,833
10년 전 조회 1,395
10년 전 조회 1,975
10년 전 조회 1,046
10년 전 조회 1,490
10년 전 조회 1,698
10년 전 조회 1,246
10년 전 조회 1,222
10년 전 조회 1,119
10년 전 조회 967
10년 전 조회 1,156
10년 전 조회 1,133
10년 전 조회 1,674
10년 전 조회 1,078
10년 전 조회 1,141
10년 전 조회 1,144
10년 전 조회 2,052
10년 전 조회 1,169
10년 전 조회 1,067
10년 전 조회 1,159
10년 전 조회 1,204
10년 전 조회 1,297
10년 전 조회 1,082
10년 전 조회 1,152
10년 전 조회 1,488
10년 전 조회 1,450
10년 전 조회 1,429
10년 전 조회 982
10년 전 조회 1,081
10년 전 조회 1,060
10년 전 조회 994
10년 전 조회 1,231
10년 전 조회 996
10년 전 조회 1,321
10년 전 조회 978
10년 전 조회 1,299
10년 전 조회 994
10년 전 조회 1,247
10년 전 조회 1,806
10년 전 조회 1,151
10년 전 조회 1,205
10년 전 조회 1,002
10년 전 조회 2,128
10년 전 조회 1,727
10년 전 조회 1,323
10년 전 조회 1,260
10년 전 조회 1,038
10년 전 조회 1,181
10년 전 조회 1,902
10년 전 조회 1,901
10년 전 조회 2,553
10년 전 조회 1,750
10년 전 조회 1,533
10년 전 조회 2,053
10년 전 조회 1,168
10년 전 조회 1,132
10년 전 조회 1,119
10년 전 조회 1,124
10년 전 조회 1,204
10년 전 조회 1,323
10년 전 조회 1,548
10년 전 조회 1,081
10년 전 조회 1,588
10년 전 조회 1,609
10년 전 조회 1,286
10년 전 조회 1,155
10년 전 조회 1,154
10년 전 조회 1,179
10년 전 조회 1,158
10년 전 조회 1,159
10년 전 조회 1,493
10년 전 조회 1,088
10년 전 조회 1,173
10년 전 조회 1,349
10년 전 조회 1,250
10년 전 조회 1,981
10년 전 조회 1,808
10년 전 조회 1,237
10년 전 조회 1,190
10년 전 조회 1,501
10년 전 조회 1,242
10년 전 조회 1,131
10년 전 조회 1,183
10년 전 조회 1,144
10년 전 조회 1,160
10년 전 조회 1,114
10년 전 조회 1,365
10년 전 조회 3,245
10년 전 조회 1,350
10년 전 조회 1,079
10년 전 조회 1,130
10년 전 조회 1,148
10년 전 조회 2,488
10년 전 조회 2,370
10년 전 조회 1,786
10년 전 조회 2,074
10년 전 조회 2,200
10년 전 조회 2,169
10년 전 조회 1,528