로컬에서 자바스크립트 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,408
10년 전 조회 1,296
10년 전 조회 835
10년 전 조회 1,437
10년 전 조회 488
10년 전 조회 937
10년 전 조회 1,136
10년 전 조회 585
10년 전 조회 542
10년 전 조회 537
10년 전 조회 382
10년 전 조회 558
10년 전 조회 558
10년 전 조회 1,089
10년 전 조회 493
10년 전 조회 577
10년 전 조회 545
10년 전 조회 1,477
10년 전 조회 580
10년 전 조회 441
10년 전 조회 585
10년 전 조회 605
10년 전 조회 678
10년 전 조회 475
10년 전 조회 536
10년 전 조회 932
10년 전 조회 861
10년 전 조회 848
10년 전 조회 391
10년 전 조회 489
10년 전 조회 483
10년 전 조회 421
10년 전 조회 694
10년 전 조회 422
10년 전 조회 757
10년 전 조회 422
10년 전 조회 722
10년 전 조회 409
10년 전 조회 635
10년 전 조회 1,210
10년 전 조회 529
10년 전 조회 553
10년 전 조회 405
10년 전 조회 1,480
10년 전 조회 1,110
10년 전 조회 709
10년 전 조회 665
10년 전 조회 469
10년 전 조회 588
10년 전 조회 1,259
10년 전 조회 1,289
10년 전 조회 1,969
10년 전 조회 1,043
10년 전 조회 925
10년 전 조회 1,427
10년 전 조회 550
10년 전 조회 522
10년 전 조회 513
10년 전 조회 495
10년 전 조회 595
10년 전 조회 704
10년 전 조회 937
10년 전 조회 467
10년 전 조회 1,017
10년 전 조회 871
10년 전 조회 676
10년 전 조회 548
10년 전 조회 517
10년 전 조회 587
10년 전 조회 521
10년 전 조회 547
10년 전 조회 878
10년 전 조회 471
10년 전 조회 574
10년 전 조회 732
10년 전 조회 646
10년 전 조회 1,360
10년 전 조회 1,169
10년 전 조회 627
10년 전 조회 555
10년 전 조회 882
10년 전 조회 609
10년 전 조회 514
10년 전 조회 569
10년 전 조회 509
10년 전 조회 549
10년 전 조회 491
10년 전 조회 725
10년 전 조회 2,574
10년 전 조회 708
10년 전 조회 439
10년 전 조회 492
10년 전 조회 524
10년 전 조회 1,833
10년 전 조회 1,755
10년 전 조회 1,137
10년 전 조회 1,433
10년 전 조회 1,571
10년 전 조회 1,522
10년 전 조회 908
🐛 버그신고