로컬에서 자바스크립트 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,435
10년 전 조회 1,334
10년 전 조회 866
10년 전 조회 1,481
10년 전 조회 524
10년 전 조회 967
10년 전 조회 1,171
10년 전 조회 614
10년 전 조회 585
10년 전 조회 576
10년 전 조회 426
10년 전 조회 598
10년 전 조회 603
10년 전 조회 1,133
10년 전 조회 541
10년 전 조회 613
10년 전 조회 584
10년 전 조회 1,513
10년 전 조회 615
10년 전 조회 480
10년 전 조회 632
10년 전 조회 643
10년 전 조회 723
10년 전 조회 511
10년 전 조회 576
10년 전 조회 971
10년 전 조회 905
10년 전 조회 888
10년 전 조회 432
10년 전 조회 531
10년 전 조회 524
10년 전 조회 460
10년 전 조회 729
10년 전 조회 458
10년 전 조회 794
10년 전 조회 460
10년 전 조회 759
10년 전 조회 456
10년 전 조회 683
10년 전 조회 1,244
10년 전 조회 567
10년 전 조회 596
10년 전 조회 435
10년 전 조회 1,523
10년 전 조회 1,147
10년 전 조회 746
10년 전 조회 699
10년 전 조회 509
10년 전 조회 626
10년 전 조회 1,296
10년 전 조회 1,327
10년 전 조회 2,003
10년 전 조회 1,085
10년 전 조회 965
10년 전 조회 1,470
10년 전 조회 587
10년 전 조회 563
10년 전 조회 544
10년 전 조회 533
10년 전 조회 630
10년 전 조회 743
10년 전 조회 976
10년 전 조회 497
10년 전 조회 1,052
10년 전 조회 912
10년 전 조회 715
10년 전 조회 589
10년 전 조회 564
10년 전 조회 620
10년 전 조회 557
10년 전 조회 593
10년 전 조회 915
10년 전 조회 517
10년 전 조회 607
10년 전 조회 775
10년 전 조회 681
10년 전 조회 1,393
10년 전 조회 1,210
10년 전 조회 672
10년 전 조회 594
10년 전 조회 921
10년 전 조회 654
10년 전 조회 553
10년 전 조회 608
10년 전 조회 556
10년 전 조회 592
10년 전 조회 534
10년 전 조회 777
10년 전 조회 2,622
10년 전 조회 752
10년 전 조회 484
10년 전 조회 529
10년 전 조회 567
10년 전 조회 1,872
10년 전 조회 1,792
10년 전 조회 1,180
10년 전 조회 1,479
10년 전 조회 1,609
10년 전 조회 1,574
10년 전 조회 954
🐛 버그신고