로컬에서 자바스크립트 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,492
10년 전 조회 1,381
10년 전 조회 926
10년 전 조회 1,532
10년 전 조회 572
10년 전 조회 1,033
10년 전 조회 1,234
10년 전 조회 689
10년 전 조회 626
10년 전 조회 632
10년 전 조회 476
10년 전 조회 655
10년 전 조회 646
10년 전 조회 1,191
10년 전 조회 599
10년 전 조회 672
10년 전 조회 646
10년 전 조회 1,564
10년 전 조회 672
10년 전 조회 526
10년 전 조회 686
10년 전 조회 689
10년 전 조회 776
10년 전 조회 557
10년 전 조회 637
10년 전 조회 1,018
10년 전 조회 962
10년 전 조회 935
10년 전 조회 482
10년 전 조회 581
10년 전 조회 583
10년 전 조회 525
10년 전 조회 769
10년 전 조회 528
10년 전 조회 838
10년 전 조회 504
10년 전 조회 820
10년 전 조회 514
10년 전 조회 742
10년 전 조회 1,307
10년 전 조회 620
10년 전 조회 655
10년 전 조회 498
10년 전 조회 1,576
10년 전 조회 1,212
10년 전 조회 817
10년 전 조회 751
10년 전 조회 551
10년 전 조회 669
10년 전 조회 1,348
10년 전 조회 1,394
10년 전 조회 2,062
10년 전 조회 1,130
10년 전 조회 1,023
10년 전 조회 1,527
10년 전 조회 646
10년 전 조회 615
10년 전 조회 606
10년 전 조회 600
10년 전 조회 688
10년 전 조회 803
10년 전 조회 1,038
10년 전 조회 569
10년 전 조회 1,105
10년 전 조회 976
10년 전 조회 775
10년 전 조회 657
10년 전 조회 627
10년 전 조회 682
10년 전 조회 628
10년 전 조회 658
10년 전 조회 994
10년 전 조회 578
10년 전 조회 671
10년 전 조회 837
10년 전 조회 743
10년 전 조회 1,464
10년 전 조회 1,281
10년 전 조회 742
10년 전 조회 657
10년 전 조회 988
10년 전 조회 717
10년 전 조회 617
10년 전 조회 673
10년 전 조회 617
10년 전 조회 659
10년 전 조회 584
10년 전 조회 839
10년 전 조회 2,687
10년 전 조회 814
10년 전 조회 545
10년 전 조회 594
10년 전 조회 634
10년 전 조회 1,940
10년 전 조회 1,859
10년 전 조회 1,246
10년 전 조회 1,545
10년 전 조회 1,677
10년 전 조회 1,639
10년 전 조회 1,014
🐛 버그신고