로컬에서 자바스크립트 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,449
10년 전 조회 1,356
10년 전 조회 884
10년 전 조회 1,497
10년 전 조회 544
10년 전 조회 984
10년 전 조회 1,194
10년 전 조회 641
10년 전 조회 602
10년 전 조회 592
10년 전 조회 450
10년 전 조회 618
10년 전 조회 618
10년 전 조회 1,150
10년 전 조회 558
10년 전 조회 627
10년 전 조회 603
10년 전 조회 1,527
10년 전 조회 643
10년 전 조회 500
10년 전 조회 648
10년 전 조회 663
10년 전 조회 741
10년 전 조회 532
10년 전 조회 598
10년 전 조회 997
10년 전 조회 931
10년 전 조회 904
10년 전 조회 461
10년 전 조회 550
10년 전 조회 555
10년 전 조회 486
10년 전 조회 745
10년 전 조회 478
10년 전 조회 814
10년 전 조회 478
10년 전 조회 772
10년 전 조회 480
10년 전 조회 704
10년 전 조회 1,261
10년 전 조회 585
10년 전 조회 619
10년 전 조회 455
10년 전 조회 1,547
10년 전 조회 1,167
10년 전 조회 769
10년 전 조회 720
10년 전 조회 531
10년 전 조회 647
10년 전 조회 1,318
10년 전 조회 1,350
10년 전 조회 2,022
10년 전 조회 1,101
10년 전 조회 989
10년 전 조회 1,492
10년 전 조회 606
10년 전 조회 582
10년 전 조회 576
10년 전 조회 557
10년 전 조회 647
10년 전 조회 764
10년 전 조회 998
10년 전 조회 521
10년 전 조회 1,072
10년 전 조회 933
10년 전 조회 736
10년 전 조회 605
10년 전 조회 585
10년 전 조회 639
10년 전 조회 583
10년 전 조회 612
10년 전 조회 935
10년 전 조회 542
10년 전 조회 631
10년 전 조회 798
10년 전 조회 708
10년 전 조회 1,417
10년 전 조회 1,234
10년 전 조회 695
10년 전 조회 613
10년 전 조회 943
10년 전 조회 675
10년 전 조회 580
10년 전 조회 629
10년 전 조회 579
10년 전 조회 617
10년 전 조회 553
10년 전 조회 804
10년 전 조회 2,645
10년 전 조회 772
10년 전 조회 505
10년 전 조회 551
10년 전 조회 591
10년 전 조회 1,898
10년 전 조회 1,811
10년 전 조회 1,204
10년 전 조회 1,503
10년 전 조회 1,631
10년 전 조회 1,595
10년 전 조회 972
🐛 버그신고