로컬에서 자바스크립트 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,622
10년 전 조회 2,504
10년 전 조회 2,050
10년 전 조회 2,625
10년 전 조회 1,685
10년 전 조회 2,086
10년 전 조회 2,329
10년 전 조회 1,840
10년 전 조회 1,765
10년 전 조회 1,733
10년 전 조회 1,602
10년 전 조회 1,776
10년 전 조회 1,782
10년 전 조회 2,292
10년 전 조회 1,700
10년 전 조회 1,805
10년 전 조회 1,766
10년 전 조회 2,704
10년 전 조회 1,826
10년 전 조회 1,710
10년 전 조회 1,801
10년 전 조회 1,821
10년 전 조회 1,898
10년 전 조회 1,703
10년 전 조회 1,790
10년 전 조회 2,126
10년 전 조회 2,068
10년 전 조회 2,042
10년 전 조회 1,608
10년 전 조회 1,704
10년 전 조회 1,657
10년 전 조회 1,618
10년 전 조회 1,829
10년 전 조회 1,616
10년 전 조회 1,921
10년 전 조회 1,595
10년 전 조회 1,928
10년 전 조회 1,637
10년 전 조회 1,862
10년 전 조회 2,451
10년 전 조회 1,766
10년 전 조회 1,821
10년 전 조회 1,698
10년 전 조회 2,745
10년 전 조회 2,371
10년 전 조회 1,988
10년 전 조회 1,888
10년 전 조회 1,704
10년 전 조회 1,826
10년 전 조회 2,518
10년 전 조회 2,564
10년 전 조회 3,210
10년 전 조회 2,306
10년 전 조회 2,196
10년 전 조회 2,687
10년 전 조회 1,820
10년 전 조회 1,798
10년 전 조회 1,786
10년 전 조회 1,787
10년 전 조회 1,850
10년 전 조회 1,971
10년 전 조회 2,227
10년 전 조회 1,786
10년 전 조회 2,209
10년 전 조회 2,182
10년 전 조회 1,928
10년 전 조회 1,821
10년 전 조회 1,794
10년 전 조회 1,825
10년 전 조회 1,797
10년 전 조회 1,788
10년 전 조회 2,138
10년 전 조회 1,716
10년 전 조회 1,809
10년 전 조회 1,974
10년 전 조회 1,854
10년 전 조회 2,587
10년 전 조회 2,384
10년 전 조회 1,853
10년 전 조회 1,799
10년 전 조회 2,091
10년 전 조회 1,820
10년 전 조회 1,731
10년 전 조회 1,811
10년 전 조회 1,726
10년 전 조회 1,763
10년 전 조회 1,727
10년 전 조회 1,955
10년 전 조회 3,823
10년 전 조회 1,927
10년 전 조회 1,694
10년 전 조회 1,738
10년 전 조회 1,776
10년 전 조회 3,083
10년 전 조회 2,998
10년 전 조회 2,376
10년 전 조회 2,666
10년 전 조회 2,820
10년 전 조회 2,772
10년 전 조회 2,141