로컬에서 자바스크립트 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,438
10년 전 조회 1,338
10년 전 조회 870
10년 전 조회 1,488
10년 전 조회 531
10년 전 조회 974
10년 전 조회 1,182
10년 전 조회 626
10년 전 조회 590
10년 전 조회 588
10년 전 조회 437
10년 전 조회 609
10년 전 조회 609
10년 전 조회 1,141
10년 전 조회 552
10년 전 조회 615
10년 전 조회 591
10년 전 조회 1,518
10년 전 조회 622
10년 전 조회 485
10년 전 조회 642
10년 전 조회 654
10년 전 조회 727
10년 전 조회 516
10년 전 조회 587
10년 전 조회 976
10년 전 조회 913
10년 전 조회 896
10년 전 조회 439
10년 전 조회 537
10년 전 조회 531
10년 전 조회 468
10년 전 조회 734
10년 전 조회 464
10년 전 조회 798
10년 전 조회 465
10년 전 조회 763
10년 전 조회 461
10년 전 조회 692
10년 전 조회 1,252
10년 전 조회 571
10년 전 조회 603
10년 전 조회 440
10년 전 조회 1,526
10년 전 조회 1,151
10년 전 조회 755
10년 전 조회 705
10년 전 조회 514
10년 전 조회 632
10년 전 조회 1,302
10년 전 조회 1,336
10년 전 조회 2,010
10년 전 조회 1,091
10년 전 조회 974
10년 전 조회 1,480
10년 전 조회 594
10년 전 조회 574
10년 전 조회 559
10년 전 조회 545
10년 전 조회 639
10년 전 조회 753
10년 전 조회 986
10년 전 조회 507
10년 전 조회 1,058
10년 전 조회 918
10년 전 조회 723
10년 전 조회 596
10년 전 조회 572
10년 전 조회 626
10년 전 조회 566
10년 전 조회 601
10년 전 조회 924
10년 전 조회 528
10년 전 조회 618
10년 전 조회 780
10년 전 조회 691
10년 전 조회 1,404
10년 전 조회 1,221
10년 전 조회 682
10년 전 조회 604
10년 전 조회 931
10년 전 조회 663
10년 전 조회 567
10년 전 조회 619
10년 전 조회 566
10년 전 조회 599
10년 전 조회 542
10년 전 조회 787
10년 전 조회 2,632
10년 전 조회 760
10년 전 조회 492
10년 전 조회 541
10년 전 조회 574
10년 전 조회 1,884
10년 전 조회 1,798
10년 전 조회 1,193
10년 전 조회 1,489
10년 전 조회 1,617
10년 전 조회 1,582
10년 전 조회 961
🐛 버그신고