로컬에서 자바스크립트 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,510
10년 전 조회 2,379
10년 전 조회 1,930
10년 전 조회 2,514
10년 전 조회 1,579
10년 전 조회 1,979
10년 전 조회 2,214
10년 전 조회 1,718
10년 전 조회 1,657
10년 전 조회 1,632
10년 전 조회 1,506
10년 전 조회 1,667
10년 전 조회 1,672
10년 전 조회 2,182
10년 전 조회 1,603
10년 전 조회 1,687
10년 전 조회 1,659
10년 전 조회 2,592
10년 전 조회 1,719
10년 전 조회 1,598
10년 전 조회 1,694
10년 전 조회 1,730
10년 전 조회 1,788
10년 전 조회 1,599
10년 전 조회 1,684
10년 전 조회 2,016
10년 전 조회 1,970
10년 전 조회 1,940
10년 전 조회 1,498
10년 전 조회 1,595
10년 전 조회 1,549
10년 전 조회 1,514
10년 전 조회 1,741
10년 전 조회 1,504
10년 전 조회 1,812
10년 전 조회 1,490
10년 전 조회 1,818
10년 전 조회 1,534
10년 전 조회 1,759
10년 전 조회 2,353
10년 전 조회 1,668
10년 전 조회 1,716
10년 전 조회 1,584
10년 전 조회 2,632
10년 전 조회 2,255
10년 전 조회 1,859
10년 전 조회 1,789
10년 전 조회 1,596
10년 전 조회 1,734
10년 전 조회 2,407
10년 전 조회 2,450
10년 전 조회 3,111
10년 전 조회 2,210
10년 전 조회 2,095
10년 전 조회 2,586
10년 전 조회 1,723
10년 전 조회 1,695
10년 전 조회 1,685
10년 전 조회 1,685
10년 전 조회 1,752
10년 전 조회 1,858
10년 전 조회 2,098
10년 전 조회 1,658
10년 전 조회 2,126
10년 전 조회 2,071
10년 전 조회 1,828
10년 전 조회 1,688
10년 전 조회 1,679
10년 전 조회 1,721
10년 전 조회 1,686
10년 전 조회 1,687
10년 전 조회 2,026
10년 전 조회 1,596
10년 전 조회 1,699
10년 전 조회 1,856
10년 전 조회 1,738
10년 전 조회 2,488
10년 전 조회 2,288
10년 전 조회 1,747
10년 전 조회 1,696
10년 전 조회 1,999
10년 전 조회 1,721
10년 전 조회 1,636
10년 전 조회 1,699
10년 전 조회 1,622
10년 전 조회 1,646
10년 전 조회 1,618
10년 전 조회 1,846
10년 전 조회 3,700
10년 전 조회 1,822
10년 전 조회 1,571
10년 전 조회 1,621
10년 전 조회 1,664
10년 전 조회 2,978
10년 전 조회 2,893
10년 전 조회 2,264
10년 전 조회 2,570
10년 전 조회 2,723
10년 전 조회 2,675
10년 전 조회 2,051