로컬에서 자바스크립트 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,304
10년 전 조회 1,195
10년 전 조회 737
10년 전 조회 1,346
10년 전 조회 391
10년 전 조회 826
10년 전 조회 1,040
10년 전 조회 494
10년 전 조회 445
10년 전 조회 446
10년 전 조회 296
10년 전 조회 446
10년 전 조회 467
10년 전 조회 993
10년 전 조회 395
10년 전 조회 469
10년 전 조회 450
10년 전 조회 1,373
10년 전 조회 478
10년 전 조회 335
10년 전 조회 488
10년 전 조회 509
10년 전 조회 582
10년 전 조회 380
10년 전 조회 439
10년 전 조회 839
10년 전 조회 770
10년 전 조회 748
10년 전 조회 302
10년 전 조회 388
10년 전 조회 391
10년 전 조회 332
10년 전 조회 600
10년 전 조회 320
10년 전 조회 659
10년 전 조회 320
10년 전 조회 617
10년 전 조회 320
10년 전 조회 543
10년 전 조회 1,112
10년 전 조회 437
10년 전 조회 455
10년 전 조회 322
10년 전 조회 1,388
10년 전 조회 1,021
10년 전 조회 617
10년 전 조회 573
10년 전 조회 390
10년 전 조회 506
10년 전 조회 1,166
10년 전 조회 1,206
10년 전 조회 1,876
10년 전 조회 955
10년 전 조회 836
10년 전 조회 1,337
10년 전 조회 454
10년 전 조회 427
10년 전 조회 426
10년 전 조회 409
10년 전 조회 496
10년 전 조회 621
10년 전 조회 854
10년 전 조회 393
10년 전 조회 918
10년 전 조회 783
10년 전 조회 594
10년 전 조회 457
10년 전 조회 428
10년 전 조회 489
10년 전 조회 441
10년 전 조회 461
10년 전 조회 790
10년 전 조회 389
10년 전 조회 477
10년 전 조회 642
10년 전 조회 560
10년 전 조회 1,269
10년 전 조회 1,081
10년 전 조회 547
10년 전 조회 459
10년 전 조회 792
10년 전 조회 519
10년 전 조회 425
10년 전 조회 485
10년 전 조회 424
10년 전 조회 466
10년 전 조회 409
10년 전 조회 651
10년 전 조회 2,498
10년 전 조회 626
10년 전 조회 356
10년 전 조회 406
10년 전 조회 442
10년 전 조회 1,741
10년 전 조회 1,672
10년 전 조회 1,059
10년 전 조회 1,352
10년 전 조회 1,480
10년 전 조회 1,439
10년 전 조회 827
🐛 버그신고