로컬에서 자바스크립트 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,344
10년 전 조회 1,238
10년 전 조회 776
10년 전 조회 1,381
10년 전 조회 430
10년 전 조회 869
10년 전 조회 1,077
10년 전 조회 531
10년 전 조회 483
10년 전 조회 480
10년 전 조회 333
10년 전 조회 492
10년 전 조회 503
10년 전 조회 1,031
10년 전 조회 436
10년 전 조회 509
10년 전 조회 487
10년 전 조회 1,415
10년 전 조회 513
10년 전 조회 384
10년 전 조회 520
10년 전 조회 547
10년 전 조회 616
10년 전 조회 416
10년 전 조회 471
10년 전 조회 871
10년 전 조회 800
10년 전 조회 780
10년 전 조회 337
10년 전 조회 419
10년 전 조회 417
10년 전 조회 359
10년 전 조회 628
10년 전 조회 348
10년 전 조회 692
10년 전 조회 350
10년 전 조회 648
10년 전 조회 343
10년 전 조회 571
10년 전 조회 1,145
10년 전 조회 459
10년 전 조회 479
10년 전 조회 349
10년 전 조회 1,408
10년 전 조회 1,048
10년 전 조회 644
10년 전 조회 597
10년 전 조회 408
10년 전 조회 529
10년 전 조회 1,193
10년 전 조회 1,228
10년 전 조회 1,896
10년 전 조회 978
10년 전 조회 853
10년 전 조회 1,360
10년 전 조회 480
10년 전 조회 452
10년 전 조회 449
10년 전 조회 434
10년 전 조회 521
10년 전 조회 642
10년 전 조회 875
10년 전 조회 416
10년 전 조회 946
10년 전 조회 806
10년 전 조회 618
10년 전 조회 483
10년 전 조회 449
10년 전 조회 516
10년 전 조회 464
10년 전 조회 482
10년 전 조회 815
10년 전 조회 408
10년 전 조회 503
10년 전 조회 664
10년 전 조회 577
10년 전 조회 1,294
10년 전 조회 1,103
10년 전 조회 565
10년 전 조회 479
10년 전 조회 817
10년 전 조회 536
10년 전 조회 443
10년 전 조회 502
10년 전 조회 438
10년 전 조회 485
10년 전 조회 422
10년 전 조회 659
10년 전 조회 2,509
10년 전 조회 643
10년 전 조회 373
10년 전 조회 420
10년 전 조회 454
10년 전 조회 1,760
10년 전 조회 1,684
10년 전 조회 1,071
10년 전 조회 1,363
10년 전 조회 1,499
10년 전 조회 1,451
10년 전 조회 839
🐛 버그신고