로컬에서 자바스크립트 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,328
10년 전 조회 1,225
10년 전 조회 763
10년 전 조회 1,367
10년 전 조회 418
10년 전 조회 854
10년 전 조회 1,065
10년 전 조회 522
10년 전 조회 469
10년 전 조회 465
10년 전 조회 315
10년 전 조회 472
10년 전 조회 486
10년 전 조회 1,011
10년 전 조회 417
10년 전 조회 496
10년 전 조회 473
10년 전 조회 1,401
10년 전 조회 498
10년 전 조회 368
10년 전 조회 511
10년 전 조회 533
10년 전 조회 600
10년 전 조회 405
10년 전 조회 456
10년 전 조회 861
10년 전 조회 788
10년 전 조회 764
10년 전 조회 325
10년 전 조회 404
10년 전 조회 406
10년 전 조회 346
10년 전 조회 619
10년 전 조회 338
10년 전 조회 678
10년 전 조회 338
10년 전 조회 636
10년 전 조회 334
10년 전 조회 559
10년 전 조회 1,129
10년 전 조회 449
10년 전 조회 467
10년 전 조회 337
10년 전 조회 1,397
10년 전 조회 1,039
10년 전 조회 631
10년 전 조회 588
10년 전 조회 401
10년 전 조회 520
10년 전 조회 1,181
10년 전 조회 1,218
10년 전 조회 1,887
10년 전 조회 971
10년 전 조회 847
10년 전 조회 1,348
10년 전 조회 467
10년 전 조회 438
10년 전 조회 438
10년 전 조회 425
10년 전 조회 511
10년 전 조회 634
10년 전 조회 866
10년 전 조회 409
10년 전 조회 932
10년 전 조회 794
10년 전 조회 607
10년 전 조회 471
10년 전 조회 439
10년 전 조회 505
10년 전 조회 457
10년 전 조회 475
10년 전 조회 805
10년 전 조회 401
10년 전 조회 490
10년 전 조회 656
10년 전 조회 570
10년 전 조회 1,285
10년 전 조회 1,093
10년 전 조회 557
10년 전 조회 471
10년 전 조회 808
10년 전 조회 533
10년 전 조회 437
10년 전 조회 497
10년 전 조회 434
10년 전 조회 480
10년 전 조회 420
10년 전 조회 656
10년 전 조회 2,506
10년 전 조회 635
10년 전 조회 366
10년 전 조회 415
10년 전 조회 448
10년 전 조회 1,751
10년 전 조회 1,681
10년 전 조회 1,067
10년 전 조회 1,360
10년 전 조회 1,491
10년 전 조회 1,445
10년 전 조회 837
🐛 버그신고