로컬에서 자바스크립트 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,462
10년 전 조회 2,337
10년 전 조회 1,886
10년 전 조회 2,474
10년 전 조회 1,533
10년 전 조회 1,938
10년 전 조회 2,178
10년 전 조회 1,675
10년 전 조회 1,608
10년 전 조회 1,589
10년 전 조회 1,444
10년 전 조회 1,628
10년 전 조회 1,619
10년 전 조회 2,138
10년 전 조회 1,547
10년 전 조회 1,634
10년 전 조회 1,618
10년 전 조회 2,543
10년 전 조회 1,679
10년 전 조회 1,558
10년 전 조회 1,645
10년 전 조회 1,679
10년 전 조회 1,758
10년 전 조회 1,552
10년 전 조회 1,634
10년 전 조회 1,976
10년 전 조회 1,930
10년 전 조회 1,908
10년 전 조회 1,460
10년 전 조회 1,565
10년 전 조회 1,512
10년 전 조회 1,478
10년 전 조회 1,698
10년 전 조회 1,468
10년 전 조회 1,766
10년 전 조회 1,450
10년 전 조회 1,786
10년 전 조회 1,486
10년 전 조회 1,718
10년 전 조회 2,321
10년 전 조회 1,627
10년 전 조회 1,681
10년 전 조회 1,552
10년 전 조회 2,595
10년 전 조회 2,220
10년 전 조회 1,823
10년 전 조회 1,746
10년 전 조회 1,570
10년 전 조회 1,682
10년 전 조회 2,357
10년 전 조회 2,418
10년 전 조회 3,073
10년 전 조회 2,175
10년 전 조회 2,050
10년 전 조회 2,549
10년 전 조회 1,683
10년 전 조회 1,649
10년 전 조회 1,650
10년 전 조회 1,644
10년 전 조회 1,712
10년 전 조회 1,816
10년 전 조회 2,051
10년 전 조회 1,616
10년 전 조회 2,091
10년 전 조회 2,033
10년 전 조회 1,784
10년 전 조회 1,656
10년 전 조회 1,638
10년 전 조회 1,688
10년 전 조회 1,643
10년 전 조회 1,641
10년 전 조회 1,979
10년 전 조회 1,557
10년 전 조회 1,665
10년 전 조회 1,812
10년 전 조회 1,706
10년 전 조회 2,451
10년 전 조회 2,249
10년 전 조회 1,704
10년 전 조회 1,654
10년 전 조회 1,959
10년 전 조회 1,692
10년 전 조회 1,600
10년 전 조회 1,660
10년 전 조회 1,590
10년 전 조회 1,611
10년 전 조회 1,586
10년 전 조회 1,815
10년 전 조회 3,667
10년 전 조회 1,793
10년 전 조회 1,534
10년 전 조회 1,590
10년 전 조회 1,627
10년 전 조회 2,945
10년 전 조회 2,854
10년 전 조회 2,233
10년 전 조회 2,536
10년 전 조회 2,689
10년 전 조회 2,643
10년 전 조회 2,017