로컬에서 자바스크립트 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,300
10년 전 조회 1,189
10년 전 조회 730
10년 전 조회 1,338
10년 전 조회 385
10년 전 조회 821
10년 전 조회 1,034
10년 전 조회 488
10년 전 조회 439
10년 전 조회 435
10년 전 조회 291
10년 전 조회 437
10년 전 조회 461
10년 전 조회 988
10년 전 조회 389
10년 전 조회 466
10년 전 조회 445
10년 전 조회 1,366
10년 전 조회 469
10년 전 조회 328
10년 전 조회 482
10년 전 조회 501
10년 전 조회 575
10년 전 조회 376
10년 전 조회 432
10년 전 조회 832
10년 전 조회 763
10년 전 조회 739
10년 전 조회 294
10년 전 조회 381
10년 전 조회 381
10년 전 조회 324
10년 전 조회 591
10년 전 조회 316
10년 전 조회 651
10년 전 조회 313
10년 전 조회 610
10년 전 조회 313
10년 전 조회 536
10년 전 조회 1,106
10년 전 조회 431
10년 전 조회 448
10년 전 조회 312
10년 전 조회 1,384
10년 전 조회 1,018
10년 전 조회 614
10년 전 조회 567
10년 전 조회 384
10년 전 조회 500
10년 전 조회 1,161
10년 전 조회 1,196
10년 전 조회 1,866
10년 전 조회 951
10년 전 조회 823
10년 전 조회 1,329
10년 전 조회 447
10년 전 조회 423
10년 전 조회 417
10년 전 조회 402
10년 전 조회 489
10년 전 조회 614
10년 전 조회 846
10년 전 조회 385
10년 전 조회 910
10년 전 조회 778
10년 전 조회 585
10년 전 조회 451
10년 전 조회 423
10년 전 조회 481
10년 전 조회 433
10년 전 조회 455
10년 전 조회 784
10년 전 조회 379
10년 전 조회 472
10년 전 조회 633
10년 전 조회 556
10년 전 조회 1,266
10년 전 조회 1,078
10년 전 조회 543
10년 전 조회 452
10년 전 조회 787
10년 전 조회 513
10년 전 조회 421
10년 전 조회 482
10년 전 조회 418
10년 전 조회 460
10년 전 조회 403
10년 전 조회 646
10년 전 조회 2,493
10년 전 조회 620
10년 전 조회 352
10년 전 조회 402
10년 전 조회 436
10년 전 조회 1,737
10년 전 조회 1,663
10년 전 조회 1,054
10년 전 조회 1,342
10년 전 조회 1,476
10년 전 조회 1,433
10년 전 조회 820
🐛 버그신고