로컬에서 자바스크립트 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,464
10년 전 조회 1,367
10년 전 조회 895
10년 전 조회 1,512
10년 전 조회 559
10년 전 조회 997
10년 전 조회 1,215
10년 전 조회 662
10년 전 조회 613
10년 전 조회 609
10년 전 조회 462
10년 전 조회 632
10년 전 조회 631
10년 전 조회 1,160
10년 전 조회 575
10년 전 조회 647
10년 전 조회 622
10년 전 조회 1,540
10년 전 조회 656
10년 전 조회 516
10년 전 조회 664
10년 전 조회 672
10년 전 조회 758
10년 전 조회 547
10년 전 조회 614
10년 전 조회 1,008
10년 전 조회 939
10년 전 조회 915
10년 전 조회 471
10년 전 조회 566
10년 전 조회 567
10년 전 조회 502
10년 전 조회 756
10년 전 조회 498
10년 전 조회 826
10년 전 조회 493
10년 전 조회 789
10년 전 조회 496
10년 전 조회 721
10년 전 조회 1,283
10년 전 조회 600
10년 전 조회 634
10년 전 조회 470
10년 전 조회 1,565
10년 전 조회 1,179
10년 전 조회 786
10년 전 조회 738
10년 전 조회 542
10년 전 조회 656
10년 전 조회 1,334
10년 전 조회 1,370
10년 전 조회 2,035
10년 전 조회 1,111
10년 전 조회 1,001
10년 전 조회 1,505
10년 전 조회 623
10년 전 조회 595
10년 전 조회 582
10년 전 조회 573
10년 전 조회 663
10년 전 조회 778
10년 전 조회 1,007
10년 전 조회 541
10년 전 조회 1,092
10년 전 조회 955
10년 전 조회 751
10년 전 조회 620
10년 전 조회 600
10년 전 조회 658
10년 전 조회 600
10년 전 조회 633
10년 전 조회 960
10년 전 조회 557
10년 전 조회 644
10년 전 조회 813
10년 전 조회 725
10년 전 조회 1,441
10년 전 조회 1,255
10년 전 조회 711
10년 전 조회 634
10년 전 조회 961
10년 전 조회 687
10년 전 조회 600
10년 전 조회 646
10년 전 조회 594
10년 전 조회 639
10년 전 조회 567
10년 전 조회 821
10년 전 조회 2,663
10년 전 조회 788
10년 전 조회 524
10년 전 조회 567
10년 전 조회 607
10년 전 조회 1,913
10년 전 조회 1,829
10년 전 조회 1,221
10년 전 조회 1,521
10년 전 조회 1,647
10년 전 조회 1,611
10년 전 조회 993
🐛 버그신고