로컬에서 자바스크립트 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,346
10년 전 조회 2,211
10년 전 조회 1,796
10년 전 조회 2,356
10년 전 조회 1,429
10년 전 조회 1,835
10년 전 조회 2,063
10년 전 조회 1,553
10년 전 조회 1,507
10년 전 조회 1,478
10년 전 조회 1,339
10년 전 조회 1,516
10년 전 조회 1,519
10년 전 조회 2,024
10년 전 조회 1,459
10년 전 조회 1,513
10년 전 조회 1,527
10년 전 조회 2,440
10년 전 조회 1,557
10년 전 조회 1,454
10년 전 조회 1,536
10년 전 조회 1,588
10년 전 조회 1,667
10년 전 조회 1,459
10년 전 조회 1,512
10년 전 조회 1,862
10년 전 조회 1,818
10년 전 조회 1,797
10년 전 조회 1,356
10년 전 조회 1,461
10년 전 조회 1,424
10년 전 조회 1,379
10년 전 조회 1,597
10년 전 조회 1,370
10년 전 조회 1,674
10년 전 조회 1,343
10년 전 조회 1,687
10년 전 조회 1,376
10년 전 조회 1,615
10년 전 조회 2,214
10년 전 조회 1,522
10년 전 조회 1,590
10년 전 조회 1,422
10년 전 조회 2,507
10년 전 조회 2,118
10년 전 조회 1,709
10년 전 조회 1,639
10년 전 조회 1,474
10년 전 조회 1,580
10년 전 조회 2,256
10년 전 조회 2,315
10년 전 조회 2,957
10년 전 조회 2,076
10년 전 조회 1,949
10년 전 조회 2,453
10년 전 조회 1,577
10년 전 조회 1,543
10년 전 조회 1,519
10년 전 조회 1,526
10년 전 조회 1,601
10년 전 조회 1,699
10년 전 조회 1,925
10년 전 조회 1,474
10년 전 조회 1,990
10년 전 조회 1,926
10년 전 조회 1,670
10년 전 조회 1,544
10년 전 조회 1,523
10년 전 조회 1,581
10년 전 조회 1,541
10년 전 조회 1,539
10년 전 조회 1,872
10년 전 조회 1,445
10년 전 조회 1,555
10년 전 조회 1,719
10년 전 조회 1,609
10년 전 조회 2,340
10년 전 조회 2,141
10년 전 조회 1,596
10년 전 조회 1,560
10년 전 조회 1,852
10년 전 조회 1,595
10년 전 조회 1,482
10년 전 조회 1,549
10년 전 조회 1,503
10년 전 조회 1,514
10년 전 조회 1,486
10년 전 조회 1,723
10년 전 조회 3,570
10년 전 조회 1,687
10년 전 조회 1,429
10년 전 조회 1,496
10년 전 조회 1,514
10년 전 조회 2,843
10년 전 조회 2,733
10년 전 조회 2,120
10년 전 조회 2,430
10년 전 조회 2,590
10년 전 조회 2,531
10년 전 조회 1,897