로컬에서 자바스크립트 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,428
10년 전 조회 1,322
10년 전 조회 856
10년 전 조회 1,472
10년 전 조회 516
10년 전 조회 958
10년 전 조회 1,164
10년 전 조회 606
10년 전 조회 575
10년 전 조회 570
10년 전 조회 418
10년 전 조회 592
10년 전 조회 593
10년 전 조회 1,125
10년 전 조회 532
10년 전 조회 602
10년 전 조회 574
10년 전 조회 1,503
10년 전 조회 603
10년 전 조회 471
10년 전 조회 621
10년 전 조회 634
10년 전 조회 716
10년 전 조회 504
10년 전 조회 571
10년 전 조회 962
10년 전 조회 895
10년 전 조회 880
10년 전 조회 426
10년 전 조회 519
10년 전 조회 507
10년 전 조회 453
10년 전 조회 720
10년 전 조회 452
10년 전 조회 787
10년 전 조회 452
10년 전 조회 754
10년 전 조회 441
10년 전 조회 673
10년 전 조회 1,238
10년 전 조회 556
10년 전 조회 585
10년 전 조회 429
10년 전 조회 1,515
10년 전 조회 1,142
10년 전 조회 740
10년 전 조회 690
10년 전 조회 499
10년 전 조회 617
10년 전 조회 1,290
10년 전 조회 1,318
10년 전 조회 1,992
10년 전 조회 1,079
10년 전 조회 954
10년 전 조회 1,459
10년 전 조회 575
10년 전 조회 555
10년 전 조회 541
10년 전 조회 522
10년 전 조회 625
10년 전 조회 733
10년 전 조회 966
10년 전 조회 493
10년 전 조회 1,042
10년 전 조회 904
10년 전 조회 705
10년 전 조회 582
10년 전 조회 555
10년 전 조회 610
10년 전 조회 552
10년 전 조회 584
10년 전 조회 907
10년 전 조회 506
10년 전 조회 605
10년 전 조회 765
10년 전 조회 675
10년 전 조회 1,390
10년 전 조회 1,205
10년 전 조회 659
10년 전 조회 589
10년 전 조회 913
10년 전 조회 648
10년 전 조회 549
10년 전 조회 598
10년 전 조회 543
10년 전 조회 586
10년 전 조회 525
10년 전 조회 770
10년 전 조회 2,615
10년 전 조회 744
10년 전 조회 479
10년 전 조회 527
10년 전 조회 558
10년 전 조회 1,866
10년 전 조회 1,784
10년 전 조회 1,177
10년 전 조회 1,468
10년 전 조회 1,599
10년 전 조회 1,564
10년 전 조회 944
🐛 버그신고