로컬에서 자바스크립트 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,459
10년 전 조회 2,336
10년 전 조회 1,885
10년 전 조회 2,471
10년 전 조회 1,532
10년 전 조회 1,935
10년 전 조회 2,177
10년 전 조회 1,668
10년 전 조회 1,606
10년 전 조회 1,589
10년 전 조회 1,442
10년 전 조회 1,625
10년 전 조회 1,618
10년 전 조회 2,135
10년 전 조회 1,546
10년 전 조회 1,632
10년 전 조회 1,617
10년 전 조회 2,543
10년 전 조회 1,672
10년 전 조회 1,557
10년 전 조회 1,645
10년 전 조회 1,679
10년 전 조회 1,758
10년 전 조회 1,551
10년 전 조회 1,633
10년 전 조회 1,976
10년 전 조회 1,930
10년 전 조회 1,908
10년 전 조회 1,460
10년 전 조회 1,562
10년 전 조회 1,511
10년 전 조회 1,475
10년 전 조회 1,698
10년 전 조회 1,468
10년 전 조회 1,764
10년 전 조회 1,450
10년 전 조회 1,786
10년 전 조회 1,485
10년 전 조회 1,716
10년 전 조회 2,321
10년 전 조회 1,624
10년 전 조회 1,679
10년 전 조회 1,552
10년 전 조회 2,595
10년 전 조회 2,219
10년 전 조회 1,820
10년 전 조회 1,746
10년 전 조회 1,569
10년 전 조회 1,682
10년 전 조회 2,355
10년 전 조회 2,416
10년 전 조회 3,071
10년 전 조회 2,173
10년 전 조회 2,050
10년 전 조회 2,548
10년 전 조회 1,679
10년 전 조회 1,647
10년 전 조회 1,650
10년 전 조회 1,643
10년 전 조회 1,710
10년 전 조회 1,815
10년 전 조회 2,046
10년 전 조회 1,613
10년 전 조회 2,090
10년 전 조회 2,033
10년 전 조회 1,780
10년 전 조회 1,651
10년 전 조회 1,633
10년 전 조회 1,683
10년 전 조회 1,641
10년 전 조회 1,639
10년 전 조회 1,974
10년 전 조회 1,554
10년 전 조회 1,660
10년 전 조회 1,809
10년 전 조회 1,703
10년 전 조회 2,450
10년 전 조회 2,245
10년 전 조회 1,700
10년 전 조회 1,653
10년 전 조회 1,957
10년 전 조회 1,691
10년 전 조회 1,597
10년 전 조회 1,657
10년 전 조회 1,587
10년 전 조회 1,610
10년 전 조회 1,584
10년 전 조회 1,813
10년 전 조회 3,667
10년 전 조회 1,791
10년 전 조회 1,533
10년 전 조회 1,589
10년 전 조회 1,625
10년 전 조회 2,944
10년 전 조회 2,852
10년 전 조회 2,232
10년 전 조회 2,534
10년 전 조회 2,686
10년 전 조회 2,642
10년 전 조회 2,015