로컬에서 자바스크립트 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,362
10년 전 조회 2,224
10년 전 조회 1,813
10년 전 조회 2,372
10년 전 조회 1,444
10년 전 조회 1,846
10년 전 조회 2,080
10년 전 조회 1,566
10년 전 조회 1,520
10년 전 조회 1,492
10년 전 조회 1,345
10년 전 조회 1,525
10년 전 조회 1,536
10년 전 조회 2,043
10년 전 조회 1,477
10년 전 조회 1,530
10년 전 조회 1,543
10년 전 조회 2,452
10년 전 조회 1,576
10년 전 조회 1,466
10년 전 조회 1,554
10년 전 조회 1,601
10년 전 조회 1,679
10년 전 조회 1,477
10년 전 조회 1,529
10년 전 조회 1,878
10년 전 조회 1,829
10년 전 조회 1,811
10년 전 조회 1,376
10년 전 조회 1,474
10년 전 조회 1,436
10년 전 조회 1,394
10년 전 조회 1,614
10년 전 조회 1,381
10년 전 조회 1,685
10년 전 조회 1,363
10년 전 조회 1,705
10년 전 조회 1,392
10년 전 조회 1,628
10년 전 조회 2,221
10년 전 조회 1,538
10년 전 조회 1,601
10년 전 조회 1,450
10년 전 조회 2,519
10년 전 조회 2,137
10년 전 조회 1,731
10년 전 조회 1,657
10년 전 조회 1,488
10년 전 조회 1,601
10년 전 조회 2,269
10년 전 조회 2,336
10년 전 조회 2,975
10년 전 조회 2,092
10년 전 조회 1,962
10년 전 조회 2,468
10년 전 조회 1,592
10년 전 조회 1,555
10년 전 조회 1,542
10년 전 조회 1,552
10년 전 조회 1,618
10년 전 조회 1,715
10년 전 조회 1,946
10년 전 조회 1,495
10년 전 조회 2,009
10년 전 조회 1,947
10년 전 조회 1,691
10년 전 조회 1,559
10년 전 조회 1,539
10년 전 조회 1,601
10년 전 조회 1,556
10년 전 조회 1,552
10년 전 조회 1,889
10년 전 조회 1,466
10년 전 조회 1,572
10년 전 조회 1,740
10년 전 조회 1,624
10년 전 조회 2,358
10년 전 조회 2,161
10년 전 조회 1,616
10년 전 조회 1,572
10년 전 조회 1,865
10년 전 조회 1,609
10년 전 조회 1,497
10년 전 조회 1,576
10년 전 조회 1,517
10년 전 조회 1,531
10년 전 조회 1,512
10년 전 조회 1,741
10년 전 조회 3,588
10년 전 조회 1,699
10년 전 조회 1,449
10년 전 조회 1,512
10년 전 조회 1,531
10년 전 조회 2,868
10년 전 조회 2,751
10년 전 조회 2,144
10년 전 조회 2,452
10년 전 조회 2,610
10년 전 조회 2,544
10년 전 조회 1,916