로컬에서 자바스크립트 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,407
10년 전 조회 2,266
10년 전 조회 1,844
10년 전 조회 2,409
10년 전 조회 1,486
10년 전 조회 1,880
10년 전 조회 2,117
10년 전 조회 1,607
10년 전 조회 1,550
10년 전 조회 1,532
10년 전 조회 1,392
10년 전 조회 1,568
10년 전 조회 1,566
10년 전 조회 2,083
10년 전 조회 1,505
10년 전 조회 1,566
10년 전 조회 1,571
10년 전 조회 2,495
10년 전 조회 1,613
10년 전 조회 1,507
10년 전 조회 1,589
10년 전 조회 1,633
10년 전 조회 1,715
10년 전 조회 1,517
10년 전 조회 1,577
10년 전 조회 1,923
10년 전 조회 1,880
10년 전 조회 1,852
10년 전 조회 1,414
10년 전 조회 1,510
10년 전 조회 1,466
10년 전 조회 1,426
10년 전 조회 1,651
10년 전 조회 1,421
10년 전 조회 1,718
10년 전 조회 1,402
10년 전 조회 1,743
10년 전 조회 1,438
10년 전 조회 1,664
10년 전 조회 2,274
10년 전 조회 1,574
10년 전 조회 1,629
10년 전 조회 1,498
10년 전 조회 2,557
10년 전 조회 2,169
10년 전 조회 1,774
10년 전 조회 1,702
10년 전 조회 1,535
10년 전 조회 1,638
10년 전 조회 2,312
10년 전 조회 2,379
10년 전 조회 3,027
10년 전 조회 2,132
10년 전 조회 2,012
10년 전 조회 2,502
10년 전 조회 1,639
10년 전 조회 1,602
10년 전 조회 1,596
10년 전 조회 1,600
10년 전 조회 1,659
10년 전 조회 1,769
10년 전 조회 2,005
10년 전 조회 1,550
10년 전 조회 2,054
10년 전 조회 1,992
10년 전 조회 1,732
10년 전 조회 1,607
10년 전 조회 1,589
10년 전 조회 1,643
10년 전 조회 1,594
10년 전 조회 1,591
10년 전 조회 1,929
10년 전 조회 1,515
10년 전 조회 1,619
10년 전 조회 1,777
10년 전 조회 1,661
10년 전 조회 2,402
10년 전 조회 2,205
10년 전 조회 1,656
10년 전 조회 1,612
10년 전 조회 1,903
10년 전 조회 1,650
10년 전 조회 1,549
10년 전 조회 1,615
10년 전 조회 1,560
10년 전 조회 1,573
10년 전 조회 1,551
10년 전 조회 1,783
10년 전 조회 3,635
10년 전 조회 1,742
10년 전 조회 1,488
10년 전 조회 1,552
10년 전 조회 1,586
10년 전 조회 2,908
10년 전 조회 2,795
10년 전 조회 2,187
10년 전 조회 2,489
10년 전 조회 2,643
10년 전 조회 2,604
10년 전 조회 1,969