로컬에서 자바스크립트 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,403
10년 전 조회 2,266
10년 전 조회 1,844
10년 전 조회 2,409
10년 전 조회 1,484
10년 전 조회 1,879
10년 전 조회 2,116
10년 전 조회 1,605
10년 전 조회 1,548
10년 전 조회 1,532
10년 전 조회 1,390
10년 전 조회 1,565
10년 전 조회 1,564
10년 전 조회 2,082
10년 전 조회 1,503
10년 전 조회 1,566
10년 전 조회 1,570
10년 전 조회 2,494
10년 전 조회 1,612
10년 전 조회 1,505
10년 전 조회 1,588
10년 전 조회 1,632
10년 전 조회 1,714
10년 전 조회 1,515
10년 전 조회 1,576
10년 전 조회 1,922
10년 전 조회 1,880
10년 전 조회 1,850
10년 전 조회 1,411
10년 전 조회 1,509
10년 전 조회 1,463
10년 전 조회 1,426
10년 전 조회 1,649
10년 전 조회 1,419
10년 전 조회 1,717
10년 전 조회 1,401
10년 전 조회 1,741
10년 전 조회 1,437
10년 전 조회 1,661
10년 전 조회 2,268
10년 전 조회 1,572
10년 전 조회 1,629
10년 전 조회 1,498
10년 전 조회 2,554
10년 전 조회 2,167
10년 전 조회 1,773
10년 전 조회 1,699
10년 전 조회 1,535
10년 전 조회 1,638
10년 전 조회 2,310
10년 전 조회 2,379
10년 전 조회 3,023
10년 전 조회 2,131
10년 전 조회 2,011
10년 전 조회 2,502
10년 전 조회 1,634
10년 전 조회 1,601
10년 전 조회 1,593
10년 전 조회 1,599
10년 전 조회 1,658
10년 전 조회 1,768
10년 전 조회 2,000
10년 전 조회 1,549
10년 전 조회 2,052
10년 전 조회 1,991
10년 전 조회 1,731
10년 전 조회 1,605
10년 전 조회 1,588
10년 전 조회 1,642
10년 전 조회 1,594
10년 전 조회 1,591
10년 전 조회 1,929
10년 전 조회 1,512
10년 전 조회 1,616
10년 전 조회 1,774
10년 전 조회 1,658
10년 전 조회 2,400
10년 전 조회 2,204
10년 전 조회 1,656
10년 전 조회 1,611
10년 전 조회 1,902
10년 전 조회 1,649
10년 전 조회 1,547
10년 전 조회 1,614
10년 전 조회 1,559
10년 전 조회 1,573
10년 전 조회 1,549
10년 전 조회 1,782
10년 전 조회 3,632
10년 전 조회 1,740
10년 전 조회 1,487
10년 전 조회 1,549
10년 전 조회 1,583
10년 전 조회 2,904
10년 전 조회 2,794
10년 전 조회 2,185
10년 전 조회 2,489
10년 전 조회 2,642
10년 전 조회 2,599
10년 전 조회 1,967