로컬에서 자바스크립트 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,313
10년 전 조회 1,211
10년 전 조회 748
10년 전 조회 1,354
10년 전 조회 401
10년 전 조회 839
10년 전 조회 1,050
10년 전 조회 507
10년 전 조회 458
10년 전 조회 452
10년 전 조회 304
10년 전 조회 457
10년 전 조회 474
10년 전 조회 1,001
10년 전 조회 406
10년 전 조회 480
10년 전 조회 458
10년 전 조회 1,383
10년 전 조회 484
10년 전 조회 348
10년 전 조회 496
10년 전 조회 518
10년 전 조회 590
10년 전 조회 394
10년 전 조회 445
10년 전 조회 848
10년 전 조회 777
10년 전 조회 754
10년 전 조회 310
10년 전 조회 396
10년 전 조회 398
10년 전 조회 337
10년 전 조회 610
10년 전 조회 328
10년 전 조회 669
10년 전 조회 329
10년 전 조회 625
10년 전 조회 326
10년 전 조회 551
10년 전 조회 1,121
10년 전 조회 441
10년 전 조회 458
10년 전 조회 328
10년 전 조회 1,392
10년 전 조회 1,031
10년 전 조회 623
10년 전 조회 581
10년 전 조회 396
10년 전 조회 514
10년 전 조회 1,174
10년 전 조회 1,213
10년 전 조회 1,881
10년 전 조회 963
10년 전 조회 842
10년 전 조회 1,342
10년 전 조회 462
10년 전 조회 431
10년 전 조회 433
10년 전 조회 417
10년 전 조회 500
10년 전 조회 627
10년 전 조회 860
10년 전 조회 400
10년 전 조회 924
10년 전 조회 788
10년 전 조회 602
10년 전 조회 463
10년 전 조회 433
10년 전 조회 496
10년 전 조회 450
10년 전 조회 468
10년 전 조회 797
10년 전 조회 397
10년 전 조회 485
10년 전 조회 649
10년 전 조회 567
10년 전 조회 1,279
10년 전 조회 1,089
10년 전 조회 553
10년 전 조회 467
10년 전 조회 799
10년 전 조회 525
10년 전 조회 431
10년 전 조회 491
10년 전 조회 429
10년 전 조회 477
10년 전 조회 416
10년 전 조회 653
10년 전 조회 2,502
10년 전 조회 632
10년 전 조회 364
10년 전 조회 413
10년 전 조회 442
10년 전 조회 1,746
10년 전 조회 1,679
10년 전 조회 1,064
10년 전 조회 1,359
10년 전 조회 1,488
10년 전 조회 1,442
10년 전 조회 831
🐛 버그신고