로컬에서 자바스크립트 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,439
10년 전 조회 1,340
10년 전 조회 871
10년 전 조회 1,489
10년 전 조회 533
10년 전 조회 975
10년 전 조회 1,183
10년 전 조회 626
10년 전 조회 592
10년 전 조회 589
10년 전 조회 438
10년 전 조회 610
10년 전 조회 611
10년 전 조회 1,143
10년 전 조회 552
10년 전 조회 616
10년 전 조회 592
10년 전 조회 1,520
10년 전 조회 624
10년 전 조회 487
10년 전 조회 643
10년 전 조회 657
10년 전 조회 729
10년 전 조회 518
10년 전 조회 587
10년 전 조회 977
10년 전 조회 915
10년 전 조회 897
10년 전 조회 439
10년 전 조회 539
10년 전 조회 536
10년 전 조회 470
10년 전 조회 735
10년 전 조회 466
10년 전 조회 799
10년 전 조회 468
10년 전 조회 765
10년 전 조회 462
10년 전 조회 692
10년 전 조회 1,253
10년 전 조회 572
10년 전 조회 606
10년 전 조회 442
10년 전 조회 1,526
10년 전 조회 1,154
10년 전 조회 756
10년 전 조회 706
10년 전 조회 515
10년 전 조회 633
10년 전 조회 1,304
10년 전 조회 1,338
10년 전 조회 2,012
10년 전 조회 1,092
10년 전 조회 976
10년 전 조회 1,480
10년 전 조회 595
10년 전 조회 576
10년 전 조회 560
10년 전 조회 546
10년 전 조회 640
10년 전 조회 754
10년 전 조회 988
10년 전 조회 507
10년 전 조회 1,059
10년 전 조회 919
10년 전 조회 725
10년 전 조회 597
10년 전 조회 573
10년 전 조회 627
10년 전 조회 566
10년 전 조회 602
10년 전 조회 926
10년 전 조회 529
10년 전 조회 619
10년 전 조회 783
10년 전 조회 693
10년 전 조회 1,405
10년 전 조회 1,222
10년 전 조회 684
10년 전 조회 605
10년 전 조회 932
10년 전 조회 664
10년 전 조회 570
10년 전 조회 620
10년 전 조회 566
10년 전 조회 600
10년 전 조회 543
10년 전 조회 789
10년 전 조회 2,633
10년 전 조회 761
10년 전 조회 493
10년 전 조회 543
10년 전 조회 574
10년 전 조회 1,885
10년 전 조회 1,799
10년 전 조회 1,194
10년 전 조회 1,491
10년 전 조회 1,618
10년 전 조회 1,584
10년 전 조회 961
🐛 버그신고