로컬에서 자바스크립트 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,470
10년 전 조회 1,371
10년 전 조회 904
10년 전 조회 1,516
10년 전 조회 562
10년 전 조회 1,002
10년 전 조회 1,216
10년 전 조회 666
10년 전 조회 614
10년 전 조회 611
10년 전 조회 465
10년 전 조회 634
10년 전 조회 632
10년 전 조회 1,168
10년 전 조회 579
10년 전 조회 651
10년 전 조회 626
10년 전 조회 1,546
10년 전 조회 659
10년 전 조회 518
10년 전 조회 668
10년 전 조회 674
10년 전 조회 761
10년 전 조회 549
10년 전 조회 620
10년 전 조회 1,011
10년 전 조회 941
10년 전 조회 917
10년 전 조회 472
10년 전 조회 568
10년 전 조회 569
10년 전 조회 505
10년 전 조회 758
10년 전 조회 505
10년 전 조회 828
10년 전 조회 494
10년 전 조회 793
10년 전 조회 498
10년 전 조회 725
10년 전 조회 1,287
10년 전 조회 604
10년 전 조회 640
10년 전 조회 479
10년 전 조회 1,568
10년 전 조회 1,186
10년 전 조회 790
10년 전 조회 741
10년 전 조회 545
10년 전 조회 661
10년 전 조회 1,340
10년 전 조회 1,373
10년 전 조회 2,038
10년 전 조회 1,117
10년 전 조회 1,004
10년 전 조회 1,509
10년 전 조회 628
10년 전 조회 599
10년 전 조회 590
10년 전 조회 583
10년 전 조회 668
10년 전 조회 783
10년 전 조회 1,015
10년 전 조회 548
10년 전 조회 1,094
10년 전 조회 957
10년 전 조회 757
10년 전 조회 626
10년 전 조회 605
10년 전 조회 664
10년 전 조회 608
10년 전 조회 636
10년 전 조회 966
10년 전 조회 562
10년 전 조회 652
10년 전 조회 819
10년 전 조회 728
10년 전 조회 1,447
10년 전 조회 1,258
10년 전 조회 716
10년 전 조회 641
10년 전 조회 968
10년 전 조회 690
10년 전 조회 603
10년 전 조회 651
10년 전 조회 597
10년 전 조회 643
10년 전 조회 571
10년 전 조회 827
10년 전 조회 2,667
10년 전 조회 795
10년 전 조회 529
10년 전 조회 572
10년 전 조회 612
10년 전 조회 1,922
10년 전 조회 1,833
10년 전 조회 1,226
10년 전 조회 1,527
10년 전 조회 1,655
10년 전 조회 1,619
10년 전 조회 1,000
🐛 버그신고