로컬에서 자바스크립트 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,476
10년 전 조회 1,375
10년 전 조회 910
10년 전 조회 1,520
10년 전 조회 568
10년 전 조회 1,008
10년 전 조회 1,219
10년 전 조회 670
10년 전 조회 615
10년 전 조회 615
10년 전 조회 466
10년 전 조회 641
10년 전 조회 635
10년 전 조회 1,172
10년 전 조회 585
10년 전 조회 656
10년 전 조회 630
10년 전 조회 1,554
10년 전 조회 661
10년 전 조회 519
10년 전 조회 673
10년 전 조회 678
10년 전 조회 762
10년 전 조회 552
10년 전 조회 625
10년 전 조회 1,011
10년 전 조회 946
10년 전 조회 920
10년 전 조회 474
10년 전 조회 571
10년 전 조회 571
10년 전 조회 508
10년 전 조회 759
10년 전 조회 512
10년 전 조회 832
10년 전 조회 498
10년 전 조회 804
10년 전 조회 500
10년 전 조회 729
10년 전 조회 1,293
10년 전 조회 609
10년 전 조회 641
10년 전 조회 483
10년 전 조회 1,569
10년 전 조회 1,191
10년 전 조회 799
10년 전 조회 745
10년 전 조회 549
10년 전 조회 662
10년 전 조회 1,343
10년 전 조회 1,377
10년 전 조회 2,045
10년 전 조회 1,122
10년 전 조회 1,011
10년 전 조회 1,511
10년 전 조회 630
10년 전 조회 604
10년 전 조회 595
10년 전 조회 587
10년 전 조회 673
10년 전 조회 789
10년 전 조회 1,019
10년 전 조회 555
10년 전 조회 1,097
10년 전 조회 962
10년 전 조회 760
10년 전 조회 633
10년 전 조회 607
10년 전 조회 669
10년 전 조회 614
10년 전 조회 638
10년 전 조회 976
10년 전 조회 566
10년 전 조회 658
10년 전 조회 821
10년 전 조회 732
10년 전 조회 1,450
10년 전 조회 1,265
10년 전 조회 721
10년 전 조회 646
10년 전 조회 971
10년 전 조회 694
10년 전 조회 607
10년 전 조회 659
10년 전 조회 600
10년 전 조회 648
10년 전 조회 573
10년 전 조회 830
10년 전 조회 2,670
10년 전 조회 800
10년 전 조회 532
10년 전 조회 576
10년 전 조회 616
10년 전 조회 1,928
10년 전 조회 1,839
10년 전 조회 1,234
10년 전 조회 1,530
10년 전 조회 1,659
10년 전 조회 1,624
10년 전 조회 1,002
🐛 버그신고