로컬에서 자바스크립트 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,497
10년 전 조회 2,367
10년 전 조회 1,915
10년 전 조회 2,502
10년 전 조회 1,564
10년 전 조회 1,968
10년 전 조회 2,205
10년 전 조회 1,699
10년 전 조회 1,636
10년 전 조회 1,615
10년 전 조회 1,486
10년 전 조회 1,654
10년 전 조회 1,653
10년 전 조회 2,169
10년 전 조회 1,583
10년 전 조회 1,666
10년 전 조회 1,637
10년 전 조회 2,573
10년 전 조회 1,701
10년 전 조회 1,581
10년 전 조회 1,671
10년 전 조회 1,717
10년 전 조회 1,777
10년 전 조회 1,576
10년 전 조회 1,666
10년 전 조회 1,998
10년 전 조회 1,958
10년 전 조회 1,932
10년 전 조회 1,483
10년 전 조회 1,585
10년 전 조회 1,537
10년 전 조회 1,499
10년 전 조회 1,729
10년 전 조회 1,490
10년 전 조회 1,802
10년 전 조회 1,475
10년 전 조회 1,806
10년 전 조회 1,518
10년 전 조회 1,740
10년 전 조회 2,340
10년 전 조회 1,655
10년 전 조회 1,703
10년 전 조회 1,574
10년 전 조회 2,620
10년 전 조회 2,240
10년 전 조회 1,850
10년 전 조회 1,773
10년 전 조회 1,587
10년 전 조회 1,716
10년 전 조회 2,389
10년 전 조회 2,439
10년 전 조회 3,095
10년 전 조회 2,193
10년 전 조회 2,082
10년 전 조회 2,571
10년 전 조회 1,710
10년 전 조회 1,679
10년 전 조회 1,671
10년 전 조회 1,672
10년 전 조회 1,739
10년 전 조회 1,849
10년 전 조회 2,085
10년 전 조회 1,645
10년 전 조회 2,114
10년 전 조회 2,062
10년 전 조회 1,811
10년 전 조회 1,674
10년 전 조회 1,662
10년 전 조회 1,710
10년 전 조회 1,671
10년 전 조회 1,672
10년 전 조회 2,011
10년 전 조회 1,579
10년 전 조회 1,687
10년 전 조회 1,840
10년 전 조회 1,733
10년 전 조회 2,474
10년 전 조회 2,276
10년 전 조회 1,732
10년 전 조회 1,686
10년 전 조회 1,991
10년 전 조회 1,711
10년 전 조회 1,624
10년 전 조회 1,687
10년 전 조회 1,610
10년 전 조회 1,634
10년 전 조회 1,602
10년 전 조회 1,837
10년 전 조회 3,686
10년 전 조회 1,813
10년 전 조회 1,557
10년 전 조회 1,610
10년 전 조회 1,646
10년 전 조회 2,968
10년 전 조회 2,880
10년 전 조회 2,252
10년 전 조회 2,560
10년 전 조회 2,711
10년 전 조회 2,665
10년 전 조회 2,037