로컬에서 자바스크립트 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,586
10년 전 조회 2,456
10년 전 조회 2,013
10년 전 조회 2,587
10년 전 조회 1,647
10년 전 조회 2,053
10년 전 조회 2,291
10년 전 조회 1,795
10년 전 조회 1,727
10년 전 조회 1,700
10년 전 조회 1,565
10년 전 조회 1,736
10년 전 조회 1,745
10년 전 조회 2,250
10년 전 조회 1,670
10년 전 조회 1,757
10년 전 조회 1,733
10년 전 조회 2,654
10년 전 조회 1,799
10년 전 조회 1,667
10년 전 조회 1,770
10년 전 조회 1,780
10년 전 조회 1,861
10년 전 조회 1,668
10년 전 조회 1,757
10년 전 조회 2,092
10년 전 조회 2,033
10년 전 조회 2,002
10년 전 조회 1,567
10년 전 조회 1,657
10년 전 조회 1,618
10년 전 조회 1,578
10년 전 조회 1,800
10년 전 조회 1,577
10년 전 조회 1,885
10년 전 조회 1,559
10년 전 조회 1,896
10년 전 조회 1,594
10년 전 조회 1,823
10년 전 조회 2,415
10년 전 조회 1,728
10년 전 조회 1,785
10년 전 조회 1,653
10년 전 조회 2,703
10년 전 조회 2,336
10년 전 조회 1,932
10년 전 조회 1,851
10년 전 조회 1,662
10년 전 조회 1,802
10년 전 조회 2,477
10년 전 조회 2,519
10년 전 조회 3,177
10년 전 조회 2,270
10년 전 조회 2,160
10년 전 조회 2,657
10년 전 조회 1,787
10년 전 조회 1,748
10년 전 조회 1,741
10년 전 조회 1,741
10년 전 조회 1,817
10년 전 조회 1,936
10년 전 조회 2,186
10년 전 조회 1,734
10년 전 조회 2,179
10년 전 조회 2,147
10년 전 조회 1,901
10년 전 조회 1,775
10년 전 조회 1,754
10년 전 조회 1,789
10년 전 조회 1,763
10년 전 조회 1,748
10년 전 조회 2,096
10년 전 조회 1,676
10년 전 조회 1,773
10년 전 조회 1,938
10년 전 조회 1,808
10년 전 조회 2,555
10년 전 조회 2,349
10년 전 조회 1,819
10년 전 조회 1,759
10년 전 조회 2,065
10년 전 조회 1,781
10년 전 조회 1,709
10년 전 조회 1,769
10년 전 조회 1,693
10년 전 조회 1,721
10년 전 조회 1,697
10년 전 조회 1,921
10년 전 조회 3,785
10년 전 조회 1,890
10년 전 조회 1,645
10년 전 조회 1,689
10년 전 조회 1,740
10년 전 조회 3,048
10년 전 조회 2,964
10년 전 조회 2,342
10년 전 조회 2,636
10년 전 조회 2,784
10년 전 조회 2,729
10년 전 조회 2,112