로컬에서 자바스크립트 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,542
10년 전 조회 2,413
10년 전 조회 1,967
10년 전 조회 2,543
10년 전 조회 1,615
10년 전 조회 2,015
10년 전 조회 2,237
10년 전 조회 1,759
10년 전 조회 1,697
10년 전 조회 1,662
10년 전 조회 1,527
10년 전 조회 1,692
10년 전 조회 1,699
10년 전 조회 2,219
10년 전 조회 1,631
10년 전 조회 1,723
10년 전 조회 1,697
10년 전 조회 2,617
10년 전 조회 1,758
10년 전 조회 1,637
10년 전 조회 1,726
10년 전 조회 1,754
10년 전 조회 1,825
10년 전 조회 1,631
10년 전 조회 1,719
10년 전 조회 2,053
10년 전 조회 1,997
10년 전 조회 1,977
10년 전 조회 1,524
10년 전 조회 1,618
10년 전 조회 1,578
10년 전 조회 1,545
10년 전 조회 1,768
10년 전 조회 1,540
10년 전 조회 1,850
10년 전 조회 1,525
10년 전 조회 1,856
10년 전 조회 1,558
10년 전 조회 1,788
10년 전 조회 2,380
10년 전 조회 1,694
10년 전 조회 1,753
10년 전 조회 1,616
10년 전 조회 2,670
10년 전 조회 2,288
10년 전 조회 1,894
10년 전 조회 1,823
10년 전 조회 1,626
10년 전 조회 1,775
10년 전 조회 2,446
10년 전 조회 2,481
10년 전 조회 3,136
10년 전 조회 2,234
10년 전 조회 2,120
10년 전 조회 2,619
10년 전 조회 1,755
10년 전 조회 1,721
10년 전 조회 1,716
10년 전 조회 1,709
10년 전 조회 1,789
10년 전 조회 1,896
10년 전 조회 2,144
10년 전 조회 1,691
10년 전 조회 2,156
10년 전 조회 2,106
10년 전 조회 1,857
10년 전 조회 1,732
10년 전 조회 1,712
10년 전 조회 1,759
10년 전 조회 1,718
10년 전 조회 1,722
10년 전 조회 2,066
10년 전 조회 1,638
10년 전 조회 1,737
10년 전 조회 1,896
10년 전 조회 1,768
10년 전 조회 2,518
10년 전 조회 2,317
10년 전 조회 1,782
10년 전 조회 1,727
10년 전 조회 2,025
10년 전 조회 1,748
10년 전 조회 1,668
10년 전 조회 1,732
10년 전 조회 1,648
10년 전 조회 1,679
10년 전 조회 1,652
10년 전 조회 1,884
10년 전 조회 3,731
10년 전 조회 1,859
10년 전 조회 1,601
10년 전 조회 1,652
10년 전 조회 1,703
10년 전 조회 3,011
10년 전 조회 2,928
10년 전 조회 2,293
10년 전 조회 2,600
10년 전 조회 2,757
10년 전 조회 2,702
10년 전 조회 2,077