로컬에서 자바스크립트 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,484
10년 전 조회 2,355
10년 전 조회 1,897
10년 전 조회 2,482
10년 전 조회 1,545
10년 전 조회 1,953
10년 전 조회 2,191
10년 전 조회 1,688
10년 전 조회 1,620
10년 전 조회 1,601
10년 전 조회 1,461
10년 전 조회 1,640
10년 전 조회 1,636
10년 전 조회 2,158
10년 전 조회 1,567
10년 전 조회 1,646
10년 전 조회 1,629
10년 전 조회 2,555
10년 전 조회 1,688
10년 전 조회 1,569
10년 전 조회 1,653
10년 전 조회 1,696
10년 전 조회 1,764
10년 전 조회 1,564
10년 전 조회 1,645
10년 전 조회 1,985
10년 전 조회 1,943
10년 전 조회 1,918
10년 전 조회 1,473
10년 전 조회 1,574
10년 전 조회 1,523
10년 전 조회 1,483
10년 전 조회 1,713
10년 전 조회 1,479
10년 전 조회 1,780
10년 전 조회 1,462
10년 전 조회 1,795
10년 전 조회 1,502
10년 전 조회 1,728
10년 전 조회 2,328
10년 전 조회 1,637
10년 전 조회 1,691
10년 전 조회 1,561
10년 전 조회 2,607
10년 전 조회 2,229
10년 전 조회 1,831
10년 전 조회 1,753
10년 전 조회 1,577
10년 전 조회 1,700
10년 전 조회 2,372
10년 전 조회 2,433
10년 전 조회 3,081
10년 전 조회 2,185
10년 전 조회 2,064
10년 전 조회 2,558
10년 전 조회 1,693
10년 전 조회 1,663
10년 전 조회 1,661
10년 전 조회 1,657
10년 전 조회 1,725
10년 전 조회 1,831
10년 전 조회 2,068
10년 전 조회 1,633
10년 전 조회 2,102
10년 전 조회 2,047
10년 전 조회 1,798
10년 전 조회 1,663
10년 전 조회 1,651
10년 전 조회 1,696
10년 전 조회 1,654
10년 전 조회 1,657
10년 전 조회 1,993
10년 전 조회 1,569
10년 전 조회 1,675
10년 전 조회 1,829
10년 전 조회 1,719
10년 전 조회 2,460
10년 전 조회 2,268
10년 전 조회 1,719
10년 전 조회 1,669
10년 전 조회 1,975
10년 전 조회 1,700
10년 전 조회 1,613
10년 전 조회 1,674
10년 전 조회 1,604
10년 전 조회 1,624
10년 전 조회 1,590
10년 전 조회 1,825
10년 전 조회 3,679
10년 전 조회 1,805
10년 전 조회 1,541
10년 전 조회 1,601
10년 전 조회 1,637
10년 전 조회 2,958
10년 전 조회 2,867
10년 전 조회 2,243
10년 전 조회 2,548
10년 전 조회 2,700
10년 전 조회 2,658
10년 전 조회 2,024