로컬에서 자바스크립트 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,395
10년 전 조회 2,259
10년 전 조회 1,838
10년 전 조회 2,404
10년 전 조회 1,477
10년 전 조회 1,873
10년 전 조회 2,107
10년 전 조회 1,599
10년 전 조회 1,545
10년 전 조회 1,527
10년 전 조회 1,387
10년 전 조회 1,558
10년 전 조회 1,560
10년 전 조회 2,079
10년 전 조회 1,499
10년 전 조회 1,558
10년 전 조회 1,563
10년 전 조회 2,487
10년 전 조회 1,606
10년 전 조회 1,499
10년 전 조회 1,580
10년 전 조회 1,627
10년 전 조회 1,708
10년 전 조회 1,511
10년 전 조회 1,572
10년 전 조회 1,918
10년 전 조회 1,874
10년 전 조회 1,846
10년 전 조회 1,401
10년 전 조회 1,502
10년 전 조회 1,458
10년 전 조회 1,421
10년 전 조회 1,642
10년 전 조회 1,417
10년 전 조회 1,714
10년 전 조회 1,395
10년 전 조회 1,732
10년 전 조회 1,433
10년 전 조회 1,652
10년 전 조회 2,264
10년 전 조회 1,564
10년 전 조회 1,625
10년 전 조회 1,491
10년 전 조회 2,549
10년 전 조회 2,166
10년 전 조회 1,766
10년 전 조회 1,696
10년 전 조회 1,525
10년 전 조회 1,631
10년 전 조회 2,302
10년 전 조회 2,370
10년 전 조회 3,013
10년 전 조회 2,123
10년 전 조회 2,001
10년 전 조회 2,499
10년 전 조회 1,628
10년 전 조회 1,594
10년 전 조회 1,584
10년 전 조회 1,589
10년 전 조회 1,651
10년 전 조회 1,761
10년 전 조회 1,994
10년 전 조회 1,539
10년 전 조회 2,046
10년 전 조회 1,984
10년 전 조회 1,722
10년 전 조회 1,593
10년 전 조회 1,580
10년 전 조회 1,636
10년 전 조회 1,586
10년 전 조회 1,586
10년 전 조회 1,923
10년 전 조회 1,498
10년 전 조회 1,603
10년 전 조회 1,768
10년 전 조회 1,653
10년 전 조회 2,390
10년 전 조회 2,199
10년 전 조회 1,648
10년 전 조회 1,607
10년 전 조회 1,897
10년 전 조회 1,641
10년 전 조회 1,538
10년 전 조회 1,604
10년 전 조회 1,553
10년 전 조회 1,566
10년 전 조회 1,543
10년 전 조회 1,777
10년 전 조회 3,628
10년 전 조회 1,735
10년 전 조회 1,479
10년 전 조회 1,542
10년 전 조회 1,579
10년 전 조회 2,895
10년 전 조회 2,783
10년 전 조회 2,174
10년 전 조회 2,480
10년 전 조회 2,637
10년 전 조회 2,582
10년 전 조회 1,958