로컬에서 자바스크립트 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,451
10년 전 조회 1,356
10년 전 조회 887
10년 전 조회 1,498
10년 전 조회 546
10년 전 조회 987
10년 전 조회 1,196
10년 전 조회 648
10년 전 조회 604
10년 전 조회 594
10년 전 조회 453
10년 전 조회 618
10년 전 조회 620
10년 전 조회 1,151
10년 전 조회 560
10년 전 조회 630
10년 전 조회 607
10년 전 조회 1,527
10년 전 조회 644
10년 전 조회 502
10년 전 조회 649
10년 전 조회 664
10년 전 조회 743
10년 전 조회 535
10년 전 조회 600
10년 전 조회 999
10년 전 조회 931
10년 전 조회 907
10년 전 조회 462
10년 전 조회 553
10년 전 조회 556
10년 전 조회 491
10년 전 조회 746
10년 전 조회 479
10년 전 조회 817
10년 전 조회 478
10년 전 조회 774
10년 전 조회 483
10년 전 조회 708
10년 전 조회 1,264
10년 전 조회 587
10년 전 조회 621
10년 전 조회 457
10년 전 조회 1,552
10년 전 조회 1,170
10년 전 조회 771
10년 전 조회 723
10년 전 조회 533
10년 전 조회 650
10년 전 조회 1,321
10년 전 조회 1,353
10년 전 조회 2,024
10년 전 조회 1,103
10년 전 조회 992
10년 전 조회 1,495
10년 전 조회 610
10년 전 조회 583
10년 전 조회 577
10년 전 조회 560
10년 전 조회 649
10년 전 조회 766
10년 전 조회 998
10년 전 조회 525
10년 전 조회 1,075
10년 전 조회 935
10년 전 조회 738
10년 전 조회 607
10년 전 조회 588
10년 전 조회 642
10년 전 조회 584
10년 전 조회 614
10년 전 조회 939
10년 전 조회 545
10년 전 조회 632
10년 전 조회 800
10년 전 조회 712
10년 전 조회 1,420
10년 전 조회 1,237
10년 전 조회 698
10년 전 조회 614
10년 전 조회 946
10년 전 조회 676
10년 전 조회 584
10년 전 조회 629
10년 전 조회 580
10년 전 조회 624
10년 전 조회 555
10년 전 조회 808
10년 전 조회 2,649
10년 전 조회 777
10년 전 조회 506
10년 전 조회 553
10년 전 조회 592
10년 전 조회 1,899
10년 전 조회 1,814
10년 전 조회 1,207
10년 전 조회 1,504
10년 전 조회 1,633
10년 전 조회 1,598
10년 전 조회 972
🐛 버그신고