로컬에서 자바스크립트 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,345
10년 전 조회 1,242
10년 전 조회 780
10년 전 조회 1,383
10년 전 조회 433
10년 전 조회 871
10년 전 조회 1,079
10년 전 조회 533
10년 전 조회 485
10년 전 조회 481
10년 전 조회 335
10년 전 조회 493
10년 전 조회 503
10년 전 조회 1,032
10년 전 조회 437
10년 전 조회 511
10년 전 조회 488
10년 전 조회 1,418
10년 전 조회 515
10년 전 조회 388
10년 전 조회 522
10년 전 조회 549
10년 전 조회 616
10년 전 조회 419
10년 전 조회 472
10년 전 조회 874
10년 전 조회 803
10년 전 조회 781
10년 전 조회 340
10년 전 조회 423
10년 전 조회 422
10년 전 조회 364
10년 전 조회 631
10년 전 조회 350
10년 전 조회 695
10년 전 조회 354
10년 전 조회 650
10년 전 조회 348
10년 전 조회 573
10년 전 조회 1,146
10년 전 조회 463
10년 전 조회 483
10년 전 조회 351
10년 전 조회 1,412
10년 전 조회 1,051
10년 전 조회 646
10년 전 조회 600
10년 전 조회 411
10년 전 조회 532
10년 전 조회 1,196
10년 전 조회 1,230
10년 전 조회 1,898
10년 전 조회 982
10년 전 조회 856
10년 전 조회 1,363
10년 전 조회 482
10년 전 조회 455
10년 전 조회 452
10년 전 조회 437
10년 전 조회 524
10년 전 조회 646
10년 전 조회 880
10년 전 조회 418
10년 전 조회 948
10년 전 조회 806
10년 전 조회 620
10년 전 조회 485
10년 전 조회 449
10년 전 조회 517
10년 전 조회 465
10년 전 조회 482
10년 전 조회 817
10년 전 조회 409
10년 전 조회 506
10년 전 조회 668
10년 전 조회 577
10년 전 조회 1,297
10년 전 조회 1,106
10년 전 조회 567
10년 전 조회 481
10년 전 조회 819
10년 전 조회 536
10년 전 조회 447
10년 전 조회 504
10년 전 조회 440
10년 전 조회 487
10년 전 조회 424
10년 전 조회 660
10년 전 조회 2,511
10년 전 조회 646
10년 전 조회 374
10년 전 조회 422
10년 전 조회 455
10년 전 조회 1,763
10년 전 조회 1,687
10년 전 조회 1,074
10년 전 조회 1,366
10년 전 조회 1,501
10년 전 조회 1,456
10년 전 조회 841
🐛 버그신고