로컬에서 자바스크립트 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,433
10년 전 조회 2,294
10년 전 조회 1,862
10년 전 조회 2,437
10년 전 조회 1,508
10년 전 조회 1,903
10년 전 조회 2,145
10년 전 조회 1,634
10년 전 조회 1,580
10년 전 조회 1,556
10년 전 조회 1,414
10년 전 조회 1,591
10년 전 조회 1,586
10년 전 조회 2,109
10년 전 조회 1,521
10년 전 조회 1,589
10년 전 조회 1,597
10년 전 조회 2,521
10년 전 조회 1,646
10년 전 조회 1,531
10년 전 조회 1,619
10년 전 조회 1,657
10년 전 조회 1,735
10년 전 조회 1,534
10년 전 조회 1,604
10년 전 조회 1,952
10년 전 조회 1,905
10년 전 조회 1,879
10년 전 조회 1,434
10년 전 조회 1,539
10년 전 조회 1,490
10년 전 조회 1,445
10년 전 조회 1,671
10년 전 조회 1,440
10년 전 조회 1,744
10년 전 조회 1,431
10년 전 조회 1,764
10년 전 조회 1,460
10년 전 조회 1,686
10년 전 조회 2,292
10년 전 조회 1,601
10년 전 조회 1,649
10년 전 조회 1,520
10년 전 조회 2,576
10년 전 조회 2,184
10년 전 조회 1,794
10년 전 조회 1,723
10년 전 조회 1,554
10년 전 조회 1,664
10년 전 조회 2,331
10년 전 조회 2,399
10년 전 조회 3,046
10년 전 조회 2,149
10년 전 조회 2,033
10년 전 조회 2,526
10년 전 조회 1,657
10년 전 조회 1,621
10년 전 조회 1,625
10년 전 조회 1,621
10년 전 조회 1,689
10년 전 조회 1,791
10년 전 조회 2,025
10년 전 조회 1,578
10년 전 조회 2,071
10년 전 조회 2,009
10년 전 조회 1,754
10년 전 조회 1,630
10년 전 조회 1,608
10년 전 조회 1,665
10년 전 조회 1,616
10년 전 조회 1,610
10년 전 조회 1,953
10년 전 조회 1,531
10년 전 조회 1,639
10년 전 조회 1,787
10년 전 조회 1,680
10년 전 조회 2,422
10년 전 조회 2,225
10년 전 조회 1,677
10년 전 조회 1,632
10년 전 조회 1,928
10년 전 조회 1,670
10년 전 조회 1,573
10년 전 조회 1,639
10년 전 조회 1,573
10년 전 조회 1,593
10년 전 조회 1,570
10년 전 조회 1,800
10년 전 조회 3,649
10년 전 조회 1,763
10년 전 조회 1,506
10년 전 조회 1,570
10년 전 조회 1,610
10년 전 조회 2,923
10년 전 조회 2,829
10년 전 조회 2,207
10년 전 조회 2,506
10년 전 조회 2,664
10년 전 조회 2,619
10년 전 조회 1,994