로컬에서 자바스크립트 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,434
10년 전 조회 1,331
10년 전 조회 861
10년 전 조회 1,478
10년 전 조회 520
10년 전 조회 965
10년 전 조회 1,168
10년 전 조회 610
10년 전 조회 579
10년 전 조회 574
10년 전 조회 421
10년 전 조회 595
10년 전 조회 600
10년 전 조회 1,130
10년 전 조회 538
10년 전 조회 608
10년 전 조회 579
10년 전 조회 1,508
10년 전 조회 611
10년 전 조회 474
10년 전 조회 629
10년 전 조회 640
10년 전 조회 722
10년 전 조회 511
10년 전 조회 574
10년 전 조회 966
10년 전 조회 901
10년 전 조회 882
10년 전 조회 430
10년 전 조회 524
10년 전 조회 520
10년 전 조회 456
10년 전 조회 723
10년 전 조회 456
10년 전 조회 790
10년 전 조회 454
10년 전 조회 756
10년 전 조회 448
10년 전 조회 682
10년 전 조회 1,242
10년 전 조회 560
10년 전 조회 591
10년 전 조회 432
10년 전 조회 1,520
10년 전 조회 1,144
10년 전 조회 743
10년 전 조회 694
10년 전 조회 504
10년 전 조회 622
10년 전 조회 1,293
10년 전 조회 1,323
10년 전 조회 1,999
10년 전 조회 1,083
10년 전 조회 959
10년 전 조회 1,463
10년 전 조회 580
10년 전 조회 558
10년 전 조회 542
10년 전 조회 528
10년 전 조회 629
10년 전 조회 740
10년 전 조회 973
10년 전 조회 495
10년 전 조회 1,046
10년 전 조회 907
10년 전 조회 710
10년 전 조회 585
10년 전 조회 559
10년 전 조회 615
10년 전 조회 555
10년 전 조회 589
10년 전 조회 910
10년 전 조회 512
10년 전 조회 605
10년 전 조회 770
10년 전 조회 680
10년 전 조회 1,392
10년 전 조회 1,207
10년 전 조회 668
10년 전 조회 591
10년 전 조회 917
10년 전 조회 652
10년 전 조회 550
10년 전 조회 600
10년 전 조회 546
10년 전 조회 589
10년 전 조회 529
10년 전 조회 773
10년 전 조회 2,617
10년 전 조회 747
10년 전 조회 482
10년 전 조회 527
10년 전 조회 561
10년 전 조회 1,867
10년 전 조회 1,787
10년 전 조회 1,178
10년 전 조회 1,472
10년 전 조회 1,602
10년 전 조회 1,570
10년 전 조회 949
🐛 버그신고