로컬에서 자바스크립트 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년 전 조회 1,490
10년 전 조회 1,379
10년 전 조회 925
10년 전 조회 1,530
10년 전 조회 572
10년 전 조회 1,030
10년 전 조회 1,231
10년 전 조회 684
10년 전 조회 625
10년 전 조회 622
10년 전 조회 473
10년 전 조회 651
10년 전 조회 645
10년 전 조회 1,187
10년 전 조회 595
10년 전 조회 670
10년 전 조회 640
10년 전 조회 1,560
10년 전 조회 669
10년 전 조회 524
10년 전 조회 684
10년 전 조회 683
10년 전 조회 773
10년 전 조회 555
10년 전 조회 634
10년 전 조회 1,016
10년 전 조회 959
10년 전 조회 934
10년 전 조회 482
10년 전 조회 581
10년 전 조회 583
10년 전 조회 521
10년 전 조회 767
10년 전 조회 525
10년 전 조회 838
10년 전 조회 503
10년 전 조회 818
10년 전 조회 511
10년 전 조회 740
10년 전 조회 1,302
10년 전 조회 618
10년 전 조회 652
10년 전 조회 496
10년 전 조회 1,576
10년 전 조회 1,211
10년 전 조회 813
10년 전 조회 751
10년 전 조회 551
10년 전 조회 669
10년 전 조회 1,347
10년 전 조회 1,394
10년 전 조회 2,059
10년 전 조회 1,129
10년 전 조회 1,020
10년 전 조회 1,524
10년 전 조회 643
10년 전 조회 613
10년 전 조회 605
10년 전 조회 596
10년 전 조회 685
10년 전 조회 800
10년 전 조회 1,032
10년 전 조회 566
10년 전 조회 1,103
10년 전 조회 971
10년 전 조회 770
10년 전 조회 654
10년 전 조회 625
10년 전 조회 679
10년 전 조회 626
10년 전 조회 654
10년 전 조회 990
10년 전 조회 574
10년 전 조회 670
10년 전 조회 833
10년 전 조회 741
10년 전 조회 1,459
10년 전 조회 1,278
10년 전 조회 739
10년 전 조회 654
10년 전 조회 987
10년 전 조회 716
10년 전 조회 615
10년 전 조회 669
10년 전 조회 617
10년 전 조회 656
10년 전 조회 582
10년 전 조회 839
10년 전 조회 2,684
10년 전 조회 812
10년 전 조회 541
10년 전 조회 590
10년 전 조회 630
10년 전 조회 1,939
10년 전 조회 1,856
10년 전 조회 1,243
10년 전 조회 1,543
10년 전 조회 1,675
10년 전 조회 1,638
10년 전 조회 1,009
🐛 버그신고