로컬에서 자바스크립트 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,358
10년 전 조회 1,257
10년 전 조회 796
10년 전 조회 1,393
10년 전 조회 450
10년 전 조회 894
10년 전 조회 1,095
10년 전 조회 543
10년 전 조회 501
10년 전 조회 495
10년 전 조회 348
10년 전 조회 506
10년 전 조회 515
10년 전 조회 1,046
10년 전 조회 452
10년 전 조회 529
10년 전 조회 502
10년 전 조회 1,433
10년 전 조회 537
10년 전 조회 401
10년 전 조회 536
10년 전 조회 561
10년 전 조회 633
10년 전 조회 433
10년 전 조회 488
10년 전 조회 891
10년 전 조회 827
10년 전 조회 802
10년 전 조회 357
10년 전 조회 441
10년 전 조회 442
10년 전 조회 383
10년 전 조회 644
10년 전 조회 368
10년 전 조회 714
10년 전 조회 368
10년 전 조회 664
10년 전 조회 367
10년 전 조회 591
10년 전 조회 1,162
10년 전 조회 480
10년 전 조회 506
10년 전 조회 360
10년 전 조회 1,431
10년 전 조회 1,065
10년 전 조회 661
10년 전 조회 616
10년 전 조회 430
10년 전 조회 550
10년 전 조회 1,213
10년 전 조회 1,248
10년 전 조회 1,917
10년 전 조회 997
10년 전 조회 873
10년 전 조회 1,378
10년 전 조회 497
10년 전 조회 473
10년 전 조회 470
10년 전 조회 451
10년 전 조회 537
10년 전 조회 663
10년 전 조회 896
10년 전 조회 430
10년 전 조회 960
10년 전 조회 824
10년 전 조회 633
10년 전 조회 499
10년 전 조회 471
10년 전 조회 530
10년 전 조회 477
10년 전 조회 500
10년 전 조회 830
10년 전 조회 422
10년 전 조회 524
10년 전 조회 682
10년 전 조회 592
10년 전 조회 1,313
10년 전 조회 1,123
10년 전 조회 580
10년 전 조회 497
10년 전 조회 832
10년 전 조회 555
10년 전 조회 459
10년 전 조회 517
10년 전 조회 456
10년 전 조회 502
10년 전 조회 439
10년 전 조회 673
10년 전 조회 2,526
10년 전 조회 658
10년 전 조회 387
10년 전 조회 433
10년 전 조회 471
10년 전 조회 1,775
10년 전 조회 1,704
10년 전 조회 1,088
10년 전 조회 1,383
10년 전 조회 1,513
10년 전 조회 1,470
10년 전 조회 850
🐛 버그신고