로컬에서 자바스크립트 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,411
10년 전 조회 1,302
10년 전 조회 843
10년 전 조회 1,447
10년 전 조회 497
10년 전 조회 944
10년 전 조회 1,145
10년 전 조회 593
10년 전 조회 552
10년 전 조회 546
10년 전 조회 396
10년 전 조회 566
10년 전 조회 566
10년 전 조회 1,096
10년 전 조회 504
10년 전 조회 586
10년 전 조회 554
10년 전 조회 1,485
10년 전 조회 583
10년 전 조회 448
10년 전 조회 595
10년 전 조회 616
10년 전 조회 684
10년 전 조회 481
10년 전 조회 547
10년 전 조회 941
10년 전 조회 869
10년 전 조회 862
10년 전 조회 402
10년 전 조회 497
10년 전 조회 491
10년 전 조회 429
10년 전 조회 702
10년 전 조회 428
10년 전 조회 765
10년 전 조회 433
10년 전 조회 734
10년 전 조회 413
10년 전 조회 649
10년 전 조회 1,218
10년 전 조회 537
10년 전 조회 563
10년 전 조회 415
10년 전 조회 1,490
10년 전 조회 1,120
10년 전 조회 716
10년 전 조회 673
10년 전 조회 479
10년 전 조회 598
10년 전 조회 1,266
10년 전 조회 1,297
10년 전 조회 1,976
10년 전 조회 1,053
10년 전 조회 933
10년 전 조회 1,434
10년 전 조회 556
10년 전 조회 532
10년 전 조회 521
10년 전 조회 501
10년 전 조회 605
10년 전 조회 709
10년 전 조회 946
10년 전 조회 478
10년 전 조회 1,026
10년 전 조회 883
10년 전 조회 685
10년 전 조회 558
10년 전 조회 530
10년 전 조회 596
10년 전 조회 530
10년 전 조회 558
10년 전 조회 887
10년 전 조회 484
10년 전 조회 582
10년 전 조회 740
10년 전 조회 655
10년 전 조회 1,368
10년 전 조회 1,180
10년 전 조회 639
10년 전 조회 568
10년 전 조회 895
10년 전 조회 623
10년 전 조회 523
10년 전 조회 582
10년 전 조회 521
10년 전 조회 559
10년 전 조회 502
10년 전 조회 740
10년 전 조회 2,580
10년 전 조회 719
10년 전 조회 451
10년 전 조회 504
10년 전 조회 536
10년 전 조회 1,845
10년 전 조회 1,760
10년 전 조회 1,150
10년 전 조회 1,445
10년 전 조회 1,582
10년 전 조회 1,533
10년 전 조회 923
🐛 버그신고