로컬에서 자바스크립트 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,422
10년 전 조회 1,315
10년 전 조회 847
10년 전 조회 1,462
10년 전 조회 511
10년 전 조회 952
10년 전 조회 1,155
10년 전 조회 600
10년 전 조회 565
10년 전 조회 565
10년 전 조회 407
10년 전 조회 584
10년 전 조회 585
10년 전 조회 1,118
10년 전 조회 526
10년 전 조회 596
10년 전 조회 564
10년 전 조회 1,498
10년 전 조회 596
10년 전 조회 465
10년 전 조회 609
10년 전 조회 629
10년 전 조회 703
10년 전 조회 496
10년 전 조회 560
10년 전 조회 955
10년 전 조회 886
10년 전 조회 874
10년 전 조회 419
10년 전 조회 513
10년 전 조회 502
10년 전 조회 444
10년 전 조회 712
10년 전 조회 444
10년 전 조회 782
10년 전 조회 449
10년 전 조회 748
10년 전 조회 428
10년 전 조회 664
10년 전 조회 1,231
10년 전 조회 547
10년 전 조회 580
10년 전 조회 421
10년 전 조회 1,507
10년 전 조회 1,136
10년 전 조회 732
10년 전 조회 682
10년 전 조회 490
10년 전 조회 610
10년 전 조회 1,282
10년 전 조회 1,310
10년 전 조회 1,983
10년 전 조회 1,070
10년 전 조회 946
10년 전 조회 1,448
10년 전 조회 568
10년 전 조회 546
10년 전 조회 532
10년 전 조회 515
10년 전 조회 617
10년 전 조회 725
10년 전 조회 962
10년 전 조회 488
10년 전 조회 1,036
10년 전 조회 897
10년 전 조회 700
10년 전 조회 574
10년 전 조회 543
10년 전 조회 605
10년 전 조회 548
10년 전 조회 575
10년 전 조회 901
10년 전 조회 503
10년 전 조회 597
10년 전 조회 755
10년 전 조회 667
10년 전 조회 1,383
10년 전 조회 1,196
10년 전 조회 652
10년 전 조회 580
10년 전 조회 906
10년 전 조회 639
10년 전 조회 544
10년 전 조회 593
10년 전 조회 530
10년 전 조회 581
10년 전 조회 520
10년 전 조회 758
10년 전 조회 2,595
10년 전 조회 735
10년 전 조회 467
10년 전 조회 518
10년 전 조회 550
10년 전 조회 1,857
10년 전 조회 1,777
10년 전 조회 1,170
10년 전 조회 1,463
10년 전 조회 1,592
10년 전 조회 1,554
10년 전 조회 939
🐛 버그신고