로컬에서 자바스크립트 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,415
10년 전 조회 1,307
10년 전 조회 844
10년 전 조회 1,455
10년 전 조회 502
10년 전 조회 947
10년 전 조회 1,150
10년 전 조회 596
10년 전 조회 558
10년 전 조회 554
10년 전 조회 401
10년 전 조회 573
10년 전 조회 571
10년 전 조회 1,107
10년 전 조회 513
10년 전 조회 593
10년 전 조회 558
10년 전 조회 1,492
10년 전 조회 589
10년 전 조회 457
10년 전 조회 602
10년 전 조회 623
10년 전 조회 696
10년 전 조회 489
10년 전 조회 551
10년 전 조회 948
10년 전 조회 877
10년 전 조회 867
10년 전 조회 410
10년 전 조회 500
10년 전 조회 496
10년 전 조회 434
10년 전 조회 707
10년 전 조회 437
10년 전 조회 771
10년 전 조회 443
10년 전 조회 738
10년 전 조회 416
10년 전 조회 655
10년 전 조회 1,224
10년 전 조회 540
10년 전 조회 571
10년 전 조회 419
10년 전 조회 1,497
10년 전 조회 1,124
10년 전 조회 721
10년 전 조회 675
10년 전 조회 484
10년 전 조회 604
10년 전 조회 1,273
10년 전 조회 1,302
10년 전 조회 1,980
10년 전 조회 1,061
10년 전 조회 941
10년 전 조회 1,440
10년 전 조회 558
10년 전 조회 536
10년 전 조회 526
10년 전 조회 508
10년 전 조회 609
10년 전 조회 717
10년 전 조회 956
10년 전 조회 482
10년 전 조회 1,028
10년 전 조회 893
10년 전 조회 691
10년 전 조회 564
10년 전 조회 539
10년 전 조회 599
10년 전 조회 539
10년 전 조회 566
10년 전 조회 894
10년 전 조회 493
10년 전 조회 586
10년 전 조회 747
10년 전 조회 662
10년 전 조회 1,372
10년 전 조회 1,186
10년 전 조회 644
10년 전 조회 575
10년 전 조회 900
10년 전 조회 631
10년 전 조회 532
10년 전 조회 588
10년 전 조회 528
10년 전 조회 568
10년 전 조회 509
10년 전 조회 747
10년 전 조회 2,587
10년 전 조회 727
10년 전 조회 457
10년 전 조회 512
10년 전 조회 543
10년 전 조회 1,850
10년 전 조회 1,768
10년 전 조회 1,157
10년 전 조회 1,451
10년 전 조회 1,588
10년 전 조회 1,544
10년 전 조회 932
🐛 버그신고