로컬에서 자바스크립트 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,341
10년 전 조회 1,237
10년 전 조회 774
10년 전 조회 1,380
10년 전 조회 428
10년 전 조회 869
10년 전 조회 1,077
10년 전 조회 530
10년 전 조회 482
10년 전 조회 479
10년 전 조회 332
10년 전 조회 490
10년 전 조회 500
10년 전 조회 1,028
10년 전 조회 434
10년 전 조회 506
10년 전 조회 486
10년 전 조회 1,411
10년 전 조회 511
10년 전 조회 381
10년 전 조회 520
10년 전 조회 545
10년 전 조회 612
10년 전 조회 415
10년 전 조회 469
10년 전 조회 867
10년 전 조회 797
10년 전 조회 776
10년 전 조회 334
10년 전 조회 415
10년 전 조회 416
10년 전 조회 357
10년 전 조회 625
10년 전 조회 346
10년 전 조회 690
10년 전 조회 348
10년 전 조회 645
10년 전 조회 341
10년 전 조회 568
10년 전 조회 1,142
10년 전 조회 457
10년 전 조회 477
10년 전 조회 348
10년 전 조회 1,405
10년 전 조회 1,048
10년 전 조회 642
10년 전 조회 594
10년 전 조회 408
10년 전 조회 529
10년 전 조회 1,192
10년 전 조회 1,225
10년 전 조회 1,895
10년 전 조회 976
10년 전 조회 851
10년 전 조회 1,360
10년 전 조회 478
10년 전 조회 451
10년 전 조회 449
10년 전 조회 432
10년 전 조회 519
10년 전 조회 640
10년 전 조회 874
10년 전 조회 415
10년 전 조회 944
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년 전 조회 659
10년 전 조회 2,509
10년 전 조회 642
10년 전 조회 372
10년 전 조회 419
10년 전 조회 454
10년 전 조회 1,758
10년 전 조회 1,683
10년 전 조회 1,070
10년 전 조회 1,362
10년 전 조회 1,497
10년 전 조회 1,449
10년 전 조회 839
🐛 버그신고