로컬에서 자바스크립트 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,428
10년 전 조회 1,322
10년 전 조회 856
10년 전 조회 1,470
10년 전 조회 515
10년 전 조회 957
10년 전 조회 1,162
10년 전 조회 606
10년 전 조회 574
10년 전 조회 570
10년 전 조회 417
10년 전 조회 591
10년 전 조회 591
10년 전 조회 1,124
10년 전 조회 532
10년 전 조회 600
10년 전 조회 574
10년 전 조회 1,502
10년 전 조회 603
10년 전 조회 470
10년 전 조회 620
10년 전 조회 634
10년 전 조회 712
10년 전 조회 503
10년 전 조회 569
10년 전 조회 961
10년 전 조회 895
10년 전 조회 879
10년 전 조회 426
10년 전 조회 518
10년 전 조회 506
10년 전 조회 452
10년 전 조회 720
10년 전 조회 450
10년 전 조회 785
10년 전 조회 451
10년 전 조회 752
10년 전 조회 440
10년 전 조회 672
10년 전 조회 1,236
10년 전 조회 555
10년 전 조회 585
10년 전 조회 428
10년 전 조회 1,514
10년 전 조회 1,142
10년 전 조회 738
10년 전 조회 688
10년 전 조회 498
10년 전 조회 615
10년 전 조회 1,289
10년 전 조회 1,318
10년 전 조회 1,992
10년 전 조회 1,077
10년 전 조회 954
10년 전 조회 1,458
10년 전 조회 574
10년 전 조회 553
10년 전 조회 540
10년 전 조회 522
10년 전 조회 623
10년 전 조회 733
10년 전 조회 965
10년 전 조회 492
10년 전 조회 1,042
10년 전 조회 902
10년 전 조회 705
10년 전 조회 580
10년 전 조회 553
10년 전 조회 608
10년 전 조회 552
10년 전 조회 583
10년 전 조회 907
10년 전 조회 506
10년 전 조회 605
10년 전 조회 764
10년 전 조회 673
10년 전 조회 1,390
10년 전 조회 1,205
10년 전 조회 659
10년 전 조회 588
10년 전 조회 912
10년 전 조회 645
10년 전 조회 549
10년 전 조회 598
10년 전 조회 540
10년 전 조회 586
10년 전 조회 524
10년 전 조회 768
10년 전 조회 2,613
10년 전 조회 742
10년 전 조회 477
10년 전 조회 525
10년 전 조회 556
10년 전 조회 1,865
10년 전 조회 1,784
10년 전 조회 1,177
10년 전 조회 1,468
10년 전 조회 1,597
10년 전 조회 1,563
10년 전 조회 942
🐛 버그신고