로컬에서 자바스크립트 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,430
10년 전 조회 1,323
10년 전 조회 858
10년 전 조회 1,472
10년 전 조회 516
10년 전 조회 961
10년 전 조회 1,165
10년 전 조회 607
10년 전 조회 575
10년 전 조회 571
10년 전 조회 418
10년 전 조회 593
10년 전 조회 593
10년 전 조회 1,126
10년 전 조회 535
10년 전 조회 604
10년 전 조회 574
10년 전 조회 1,505
10년 전 조회 604
10년 전 조회 472
10년 전 조회 623
10년 전 조회 637
10년 전 조회 717
10년 전 조회 508
10년 전 조회 572
10년 전 조회 964
10년 전 조회 898
10년 전 조회 880
10년 전 조회 427
10년 전 조회 520
10년 전 조회 510
10년 전 조회 454
10년 전 조회 720
10년 전 조회 453
10년 전 조회 787
10년 전 조회 452
10년 전 조회 755
10년 전 조회 443
10년 전 조회 673
10년 전 조회 1,240
10년 전 조회 557
10년 전 조회 585
10년 전 조회 429
10년 전 조회 1,516
10년 전 조회 1,142
10년 전 조회 740
10년 전 조회 692
10년 전 조회 500
10년 전 조회 617
10년 전 조회 1,291
10년 전 조회 1,318
10년 전 조회 1,993
10년 전 조회 1,079
10년 전 조회 955
10년 전 조회 1,460
10년 전 조회 576
10년 전 조회 555
10년 전 조회 541
10년 전 조회 525
10년 전 조회 626
10년 전 조회 736
10년 전 조회 967
10년 전 조회 494
10년 전 조회 1,043
10년 전 조회 904
10년 전 조회 706
10년 전 조회 582
10년 전 조회 557
10년 전 조회 611
10년 전 조회 553
10년 전 조회 587
10년 전 조회 908
10년 전 조회 506
10년 전 조회 605
10년 전 조회 765
10년 전 조회 676
10년 전 조회 1,390
10년 전 조회 1,205
10년 전 조회 661
10년 전 조회 590
10년 전 조회 915
10년 전 조회 649
10년 전 조회 549
10년 전 조회 599
10년 전 조회 545
10년 전 조회 586
10년 전 조회 526
10년 전 조회 770
10년 전 조회 2,615
10년 전 조회 745
10년 전 조회 480
10년 전 조회 527
10년 전 조회 558
10년 전 조회 1,866
10년 전 조회 1,784
10년 전 조회 1,177
10년 전 조회 1,468
10년 전 조회 1,599
10년 전 조회 1,565
10년 전 조회 944
🐛 버그신고