로컬에서 자바스크립트 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,512
10년 전 조회 2,380
10년 전 조회 1,932
10년 전 조회 2,514
10년 전 조회 1,580
10년 전 조회 1,984
10년 전 조회 2,215
10년 전 조회 1,719
10년 전 조회 1,659
10년 전 조회 1,634
10년 전 조회 1,507
10년 전 조회 1,668
10년 전 조회 1,674
10년 전 조회 2,183
10년 전 조회 1,604
10년 전 조회 1,689
10년 전 조회 1,659
10년 전 조회 2,594
10년 전 조회 1,720
10년 전 조회 1,600
10년 전 조회 1,695
10년 전 조회 1,731
10년 전 조회 1,792
10년 전 조회 1,600
10년 전 조회 1,687
10년 전 조회 2,018
10년 전 조회 1,970
10년 전 조회 1,941
10년 전 조회 1,498
10년 전 조회 1,597
10년 전 조회 1,553
10년 전 조회 1,517
10년 전 조회 1,744
10년 전 조회 1,505
10년 전 조회 1,815
10년 전 조회 1,493
10년 전 조회 1,818
10년 전 조회 1,535
10년 전 조회 1,760
10년 전 조회 2,354
10년 전 조회 1,674
10년 전 조회 1,719
10년 전 조회 1,584
10년 전 조회 2,637
10년 전 조회 2,262
10년 전 조회 1,864
10년 전 조회 1,790
10년 전 조회 1,598
10년 전 조회 1,736
10년 전 조회 2,409
10년 전 조회 2,454
10년 전 조회 3,112
10년 전 조회 2,211
10년 전 조회 2,097
10년 전 조회 2,587
10년 전 조회 1,727
10년 전 조회 1,697
10년 전 조회 1,686
10년 전 조회 1,686
10년 전 조회 1,753
10년 전 조회 1,859
10년 전 조회 2,098
10년 전 조회 1,658
10년 전 조회 2,134
10년 전 조회 2,072
10년 전 조회 1,829
10년 전 조회 1,688
10년 전 조회 1,681
10년 전 조회 1,722
10년 전 조회 1,686
10년 전 조회 1,688
10년 전 조회 2,028
10년 전 조회 1,599
10년 전 조회 1,703
10년 전 조회 1,861
10년 전 조회 1,740
10년 전 조회 2,490
10년 전 조회 2,292
10년 전 조회 1,748
10년 전 조회 1,697
10년 전 조회 2,003
10년 전 조회 1,723
10년 전 조회 1,640
10년 전 조회 1,699
10년 전 조회 1,622
10년 전 조회 1,649
10년 전 조회 1,619
10년 전 조회 1,850
10년 전 조회 3,702
10년 전 조회 1,823
10년 전 조회 1,575
10년 전 조회 1,623
10년 전 조회 1,665
10년 전 조회 2,981
10년 전 조회 2,895
10년 전 조회 2,267
10년 전 조회 2,571
10년 전 조회 2,728
10년 전 조회 2,677
10년 전 조회 2,052