로컬에서 자바스크립트 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,340
10년 전 조회 1,235
10년 전 조회 773
10년 전 조회 1,379
10년 전 조회 426
10년 전 조회 869
10년 전 조회 1,077
10년 전 조회 530
10년 전 조회 479
10년 전 조회 478
10년 전 조회 330
10년 전 조회 489
10년 전 조회 499
10년 전 조회 1,027
10년 전 조회 433
10년 전 조회 505
10년 전 조회 486
10년 전 조회 1,410
10년 전 조회 510
10년 전 조회 380
10년 전 조회 520
10년 전 조회 545
10년 전 조회 611
10년 전 조회 414
10년 전 조회 469
10년 전 조회 867
10년 전 조회 796
10년 전 조회 776
10년 전 조회 334
10년 전 조회 413
10년 전 조회 415
10년 전 조회 356
10년 전 조회 624
10년 전 조회 345
10년 전 조회 688
10년 전 조회 347
10년 전 조회 644
10년 전 조회 340
10년 전 조회 567
10년 전 조회 1,142
10년 전 조회 455
10년 전 조회 475
10년 전 조회 348
10년 전 조회 1,405
10년 전 조회 1,048
10년 전 조회 642
10년 전 조회 593
10년 전 조회 408
10년 전 조회 529
10년 전 조회 1,191
10년 전 조회 1,225
10년 전 조회 1,894
10년 전 조회 976
10년 전 조회 851
10년 전 조회 1,360
10년 전 조회 478
10년 전 조회 449
10년 전 조회 448
10년 전 조회 432
10년 전 조회 519
10년 전 조회 640
10년 전 조회 874
10년 전 조회 415
10년 전 조회 943
10년 전 조회 806
10년 전 조회 618
10년 전 조회 482
10년 전 조회 449
10년 전 조회 514
10년 전 조회 464
10년 전 조회 482
10년 전 조회 815
10년 전 조회 408
10년 전 조회 503
10년 전 조회 664
10년 전 조회 577
10년 전 조회 1,294
10년 전 조회 1,103
10년 전 조회 565
10년 전 조회 476
10년 전 조회 816
10년 전 조회 535
10년 전 조회 443
10년 전 조회 502
10년 전 조회 438
10년 전 조회 485
10년 전 조회 422
10년 전 조회 658
10년 전 조회 2,509
10년 전 조회 642
10년 전 조회 372
10년 전 조회 419
10년 전 조회 454
10년 전 조회 1,758
10년 전 조회 1,682
10년 전 조회 1,070
10년 전 조회 1,362
10년 전 조회 1,497
10년 전 조회 1,449
10년 전 조회 839
🐛 버그신고