로컬에서 자바스크립트 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,435
10년 전 조회 1,332
10년 전 조회 865
10년 전 조회 1,479
10년 전 조회 522
10년 전 조회 965
10년 전 조회 1,169
10년 전 조회 611
10년 전 조회 581
10년 전 조회 574
10년 전 조회 423
10년 전 조회 596
10년 전 조회 601
10년 전 조회 1,130
10년 전 조회 540
10년 전 조회 611
10년 전 조회 582
10년 전 조회 1,510
10년 전 조회 612
10년 전 조회 478
10년 전 조회 630
10년 전 조회 642
10년 전 조회 723
10년 전 조회 511
10년 전 조회 575
10년 전 조회 969
10년 전 조회 903
10년 전 조회 885
10년 전 조회 431
10년 전 조회 526
10년 전 조회 522
10년 전 조회 458
10년 전 조회 726
10년 전 조회 456
10년 전 조회 792
10년 전 조회 457
10년 전 조회 757
10년 전 조회 452
10년 전 조회 683
10년 전 조회 1,242
10년 전 조회 563
10년 전 조회 594
10년 전 조회 432
10년 전 조회 1,521
10년 전 조회 1,145
10년 전 조회 745
10년 전 조회 696
10년 전 조회 507
10년 전 조회 624
10년 전 조회 1,295
10년 전 조회 1,324
10년 전 조회 2,002
10년 전 조회 1,084
10년 전 조회 961
10년 전 조회 1,467
10년 전 조회 582
10년 전 조회 559
10년 전 조회 544
10년 전 조회 531
10년 전 조회 630
10년 전 조회 742
10년 전 조회 975
10년 전 조회 496
10년 전 조회 1,050
10년 전 조회 910
10년 전 조회 711
10년 전 조회 587
10년 전 조회 561
10년 전 조회 618
10년 전 조회 557
10년 전 조회 591
10년 전 조회 913
10년 전 조회 515
10년 전 조회 607
10년 전 조회 773
10년 전 조회 681
10년 전 조회 1,392
10년 전 조회 1,209
10년 전 조회 669
10년 전 조회 591
10년 전 조회 918
10년 전 조회 653
10년 전 조회 551
10년 전 조회 603
10년 전 조회 552
10년 전 조회 591
10년 전 조회 532
10년 전 조회 775
10년 전 조회 2,620
10년 전 조회 748
10년 전 조회 484
10년 전 조회 528
10년 전 조회 564
10년 전 조회 1,870
10년 전 조회 1,790
10년 전 조회 1,179
10년 전 조회 1,475
10년 전 조회 1,603
10년 전 조회 1,571
10년 전 조회 951
🐛 버그신고