로컬에서 자바스크립트 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,378
10년 전 조회 1,929
10년 전 조회 2,513
10년 전 조회 1,577
10년 전 조회 1,979
10년 전 조회 2,214
10년 전 조회 1,715
10년 전 조회 1,656
10년 전 조회 1,630
10년 전 조회 1,504
10년 전 조회 1,667
10년 전 조회 1,669
10년 전 조회 2,182
10년 전 조회 1,602
10년 전 조회 1,687
10년 전 조회 1,655
10년 전 조회 2,591
10년 전 조회 1,718
10년 전 조회 1,597
10년 전 조회 1,693
10년 전 조회 1,729
10년 전 조회 1,786
10년 전 조회 1,597
10년 전 조회 1,682
10년 전 조회 2,015
10년 전 조회 1,970
10년 전 조회 1,940
10년 전 조회 1,497
10년 전 조회 1,594
10년 전 조회 1,548
10년 전 조회 1,513
10년 전 조회 1,739
10년 전 조회 1,501
10년 전 조회 1,811
10년 전 조회 1,488
10년 전 조회 1,818
10년 전 조회 1,533
10년 전 조회 1,759
10년 전 조회 2,352
10년 전 조회 1,667
10년 전 조회 1,715
10년 전 조회 1,584
10년 전 조회 2,632
10년 전 조회 2,253
10년 전 조회 1,859
10년 전 조회 1,789
10년 전 조회 1,595
10년 전 조회 1,732
10년 전 조회 2,405
10년 전 조회 2,450
10년 전 조회 3,111
10년 전 조회 2,209
10년 전 조회 2,095
10년 전 조회 2,586
10년 전 조회 1,720
10년 전 조회 1,691
10년 전 조회 1,683
10년 전 조회 1,683
10년 전 조회 1,752
10년 전 조회 1,857
10년 전 조회 2,096
10년 전 조회 1,654
10년 전 조회 2,126
10년 전 조회 2,070
10년 전 조회 1,826
10년 전 조회 1,684
10년 전 조회 1,676
10년 전 조회 1,719
10년 전 조회 1,685
10년 전 조회 1,684
10년 전 조회 2,026
10년 전 조회 1,595
10년 전 조회 1,698
10년 전 조회 1,856
10년 전 조회 1,738
10년 전 조회 2,488
10년 전 조회 2,288
10년 전 조회 1,747
10년 전 조회 1,696
10년 전 조회 1,999
10년 전 조회 1,720
10년 전 조회 1,634
10년 전 조회 1,698
10년 전 조회 1,621
10년 전 조회 1,646
10년 전 조회 1,616
10년 전 조회 1,846
10년 전 조회 3,699
10년 전 조회 1,822
10년 전 조회 1,571
10년 전 조회 1,621
10년 전 조회 1,661
10년 전 조회 2,978
10년 전 조회 2,893
10년 전 조회 2,263
10년 전 조회 2,569
10년 전 조회 2,723
10년 전 조회 2,675
10년 전 조회 2,047