로컬에서 자바스크립트 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,457
10년 전 조회 1,367
10년 전 조회 892
10년 전 조회 1,507
10년 전 조회 554
10년 전 조회 989
10년 전 조회 1,211
10년 전 조회 657
10년 전 조회 610
10년 전 조회 605
10년 전 조회 458
10년 전 조회 625
10년 전 조회 626
10년 전 조회 1,155
10년 전 조회 570
10년 전 조회 638
10년 전 조회 618
10년 전 조회 1,536
10년 전 조회 651
10년 전 조회 511
10년 전 조회 657
10년 전 조회 669
10년 전 조회 751
10년 전 조회 543
10년 전 조회 606
10년 전 조회 1,004
10년 전 조회 934
10년 전 조회 912
10년 전 조회 467
10년 전 조회 558
10년 전 조회 561
10년 전 조회 500
10년 전 조회 754
10년 전 조회 490
10년 전 조회 822
10년 전 조회 485
10년 전 조회 780
10년 전 조회 488
10년 전 조회 719
10년 전 조회 1,272
10년 전 조회 597
10년 전 조회 628
10년 전 조회 464
10년 전 조회 1,564
10년 전 조회 1,174
10년 전 조회 778
10년 전 조회 733
10년 전 조회 540
10년 전 조회 656
10년 전 조회 1,329
10년 전 조회 1,366
10년 전 조회 2,029
10년 전 조회 1,109
10년 전 조회 995
10년 전 조회 1,501
10년 전 조회 618
10년 전 조회 590
10년 전 조회 580
10년 전 조회 568
10년 전 조회 655
10년 전 조회 773
10년 전 조회 1,003
10년 전 조회 532
10년 전 조회 1,088
10년 전 조회 945
10년 전 조회 744
10년 전 조회 613
10년 전 조회 593
10년 전 조회 651
10년 전 조회 591
10년 전 조회 626
10년 전 조회 951
10년 전 조회 550
10년 전 조회 640
10년 전 조회 806
10년 전 조회 717
10년 전 조회 1,431
10년 전 조회 1,246
10년 전 조회 706
10년 전 조회 626
10년 전 조회 953
10년 전 조회 682
10년 전 조회 592
10년 전 조회 636
10년 전 조회 589
10년 전 조회 628
10년 전 조회 563
10년 전 조회 817
10년 전 조회 2,658
10년 전 조회 786
10년 전 조회 513
10년 전 조회 557
10년 전 조회 600
10년 전 조회 1,907
10년 전 조회 1,819
10년 전 조회 1,212
10년 전 조회 1,512
10년 전 조회 1,639
10년 전 조회 1,601
10년 전 조회 982
🐛 버그신고