로컬에서 자바스크립트 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,456
10년 전 조회 1,364
10년 전 조회 891
10년 전 조회 1,505
10년 전 조회 554
10년 전 조회 988
10년 전 조회 1,206
10년 전 조회 654
10년 전 조회 606
10년 전 조회 599
10년 전 조회 455
10년 전 조회 622
10년 전 조회 623
10년 전 조회 1,154
10년 전 조회 565
10년 전 조회 638
10년 전 조회 614
10년 전 조회 1,532
10년 전 조회 649
10년 전 조회 508
10년 전 조회 654
10년 전 조회 669
10년 전 조회 749
10년 전 조회 540
10년 전 조회 605
10년 전 조회 1,003
10년 전 조회 933
10년 전 조회 911
10년 전 조회 463
10년 전 조회 556
10년 전 조회 558
10년 전 조회 497
10년 전 조회 750
10년 전 조회 487
10년 전 조회 820
10년 전 조회 482
10년 전 조회 780
10년 전 조회 485
10년 전 조회 712
10년 전 조회 1,270
10년 전 조회 596
10년 전 조회 627
10년 전 조회 462
10년 전 조회 1,559
10년 전 조회 1,171
10년 전 조회 776
10년 전 조회 727
10년 전 조회 535
10년 전 조회 652
10년 전 조회 1,327
10년 전 조회 1,364
10년 전 조회 2,028
10년 전 조회 1,106
10년 전 조회 992
10년 전 조회 1,498
10년 전 조회 615
10년 전 조회 587
10년 전 조회 580
10년 전 조회 567
10년 전 조회 654
10년 전 조회 771
10년 전 조회 999
10년 전 조회 528
10년 전 조회 1,085
10년 전 조회 938
10년 전 조회 742
10년 전 조회 612
10년 전 조회 590
10년 전 조회 649
10년 전 조회 586
10년 전 조회 621
10년 전 조회 948
10년 전 조회 550
10년 전 조회 638
10년 전 조회 805
10년 전 조회 714
10년 전 조회 1,429
10년 전 조회 1,242
10년 전 조회 704
10년 전 조회 623
10년 전 조회 951
10년 전 조회 679
10년 전 조회 590
10년 전 조회 632
10년 전 조회 583
10년 전 조회 625
10년 전 조회 561
10년 전 조회 812
10년 전 조회 2,654
10년 전 조회 781
10년 전 조회 510
10년 전 조회 555
10년 전 조회 598
10년 전 조회 1,905
10년 전 조회 1,818
10년 전 조회 1,211
10년 전 조회 1,509
10년 전 조회 1,636
10년 전 조회 1,599
10년 전 조회 979
🐛 버그신고