로컬에서 자바스크립트 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,441
10년 전 조회 2,309
10년 전 조회 1,868
10년 전 조회 2,443
10년 전 조회 1,516
10년 전 조회 1,913
10년 전 조회 2,153
10년 전 조회 1,648
10년 전 조회 1,587
10년 전 조회 1,562
10년 전 조회 1,422
10년 전 조회 1,601
10년 전 조회 1,597
10년 전 조회 2,116
10년 전 조회 1,528
10년 전 조회 1,600
10년 전 조회 1,601
10년 전 조회 2,525
10년 전 조회 1,657
10년 전 조회 1,542
10년 전 조회 1,626
10년 전 조회 1,666
10년 전 조회 1,738
10년 전 조회 1,537
10년 전 조회 1,614
10년 전 조회 1,961
10년 전 조회 1,914
10년 전 조회 1,890
10년 전 조회 1,441
10년 전 조회 1,546
10년 전 조회 1,497
10년 전 조회 1,459
10년 전 조회 1,684
10년 전 조회 1,451
10년 전 조회 1,749
10년 전 조회 1,442
10년 전 조회 1,775
10년 전 조회 1,469
10년 전 조회 1,699
10년 전 조회 2,299
10년 전 조회 1,610
10년 전 조회 1,659
10년 전 조회 1,527
10년 전 조회 2,585
10년 전 조회 2,196
10년 전 조회 1,800
10년 전 조회 1,733
10년 전 조회 1,561
10년 전 조회 1,670
10년 전 조회 2,338
10년 전 조회 2,403
10년 전 조회 3,056
10년 전 조회 2,155
10년 전 조회 2,039
10년 전 조회 2,534
10년 전 조회 1,662
10년 전 조회 1,629
10년 전 조회 1,635
10년 전 조회 1,626
10년 전 조회 1,695
10년 전 조회 1,799
10년 전 조회 2,032
10년 전 조회 1,594
10년 전 조회 2,075
10년 전 조회 2,016
10년 전 조회 1,760
10년 전 조회 1,633
10년 전 조회 1,616
10년 전 조회 1,669
10년 전 조회 1,627
10년 전 조회 1,621
10년 전 조회 1,959
10년 전 조회 1,538
10년 전 조회 1,646
10년 전 조회 1,796
10년 전 조회 1,688
10년 전 조회 2,430
10년 전 조회 2,229
10년 전 조회 1,685
10년 전 조회 1,638
10년 전 조회 1,938
10년 전 조회 1,675
10년 전 조회 1,578
10년 전 조회 1,647
10년 전 조회 1,576
10년 전 조회 1,596
10년 전 조회 1,572
10년 전 조회 1,805
10년 전 조회 3,654
10년 전 조회 1,772
10년 전 조회 1,513
10년 전 조회 1,572
10년 전 조회 1,613
10년 전 조회 2,932
10년 전 조회 2,834
10년 전 조회 2,212
10년 전 조회 2,516
10년 전 조회 2,673
10년 전 조회 2,628
10년 전 조회 2,001