로컬에서 자바스크립트 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년 전 조회 886
10년 전 조회 1,497
10년 전 조회 546
10년 전 조회 987
10년 전 조회 1,194
10년 전 조회 644
10년 전 조회 602
10년 전 조회 593
10년 전 조회 452
10년 전 조회 618
10년 전 조회 620
10년 전 조회 1,151
10년 전 조회 558
10년 전 조회 628
10년 전 조회 606
10년 전 조회 1,527
10년 전 조회 644
10년 전 조회 501
10년 전 조회 648
10년 전 조회 663
10년 전 조회 741
10년 전 조회 534
10년 전 조회 599
10년 전 조회 997
10년 전 조회 931
10년 전 조회 906
10년 전 조회 461
10년 전 조회 553
10년 전 조회 556
10년 전 조회 489
10년 전 조회 746
10년 전 조회 478
10년 전 조회 815
10년 전 조회 478
10년 전 조회 773
10년 전 조회 483
10년 전 조회 705
10년 전 조회 1,261
10년 전 조회 587
10년 전 조회 619
10년 전 조회 457
10년 전 조회 1,549
10년 전 조회 1,169
10년 전 조회 769
10년 전 조회 722
10년 전 조회 533
10년 전 조회 650
10년 전 조회 1,320
10년 전 조회 1,352
10년 전 조회 2,022
10년 전 조회 1,101
10년 전 조회 991
10년 전 조회 1,494
10년 전 조회 609
10년 전 조회 583
10년 전 조회 576
10년 전 조회 559
10년 전 조회 648
10년 전 조회 765
10년 전 조회 998
10년 전 조회 524
10년 전 조회 1,073
10년 전 조회 933
10년 전 조회 737
10년 전 조회 605
10년 전 조회 588
10년 전 조회 641
10년 전 조회 583
10년 전 조회 614
10년 전 조회 937
10년 전 조회 543
10년 전 조회 632
10년 전 조회 798
10년 전 조회 711
10년 전 조회 1,419
10년 전 조회 1,235
10년 전 조회 697
10년 전 조회 614
10년 전 조회 945
10년 전 조회 676
10년 전 조회 583
10년 전 조회 629
10년 전 조회 579
10년 전 조회 621
10년 전 조회 554
10년 전 조회 806
10년 전 조회 2,648
10년 전 조회 775
10년 전 조회 505
10년 전 조회 553
10년 전 조회 592
10년 전 조회 1,899
10년 전 조회 1,814
10년 전 조회 1,206
10년 전 조회 1,503
10년 전 조회 1,631
10년 전 조회 1,598
10년 전 조회 972
🐛 버그신고