로컬에서 자바스크립트 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,401
10년 전 조회 1,290
10년 전 조회 830
10년 전 조회 1,428
10년 전 조회 483
10년 전 조회 928
10년 전 조회 1,128
10년 전 조회 580
10년 전 조회 536
10년 전 조회 533
10년 전 조회 379
10년 전 조회 549
10년 전 조회 548
10년 전 조회 1,084
10년 전 조회 488
10년 전 조회 572
10년 전 조회 535
10년 전 조회 1,470
10년 전 조회 571
10년 전 조회 436
10년 전 조회 574
10년 전 조회 600
10년 전 조회 668
10년 전 조회 466
10년 전 조회 529
10년 전 조회 925
10년 전 조회 854
10년 전 조회 844
10년 전 조회 385
10년 전 조회 480
10년 전 조회 473
10년 전 조회 410
10년 전 조회 683
10년 전 조회 413
10년 전 조회 747
10년 전 조회 415
10년 전 조회 711
10년 전 조회 396
10년 전 조회 624
10년 전 조회 1,203
10년 전 조회 521
10년 전 조회 544
10년 전 조회 398
10년 전 조회 1,472
10년 전 조회 1,100
10년 전 조회 704
10년 전 조회 657
10년 전 조회 459
10년 전 조회 578
10년 전 조회 1,250
10년 전 조회 1,283
10년 전 조회 1,962
10년 전 조회 1,035
10년 전 조회 915
10년 전 조회 1,417
10년 전 조회 542
10년 전 조회 513
10년 전 조회 509
10년 전 조회 492
10년 전 조회 585
10년 전 조회 699
10년 전 조회 933
10년 전 조회 462
10년 전 조회 1,009
10년 전 조회 867
10년 전 조회 665
10년 전 조회 540
10년 전 조회 510
10년 전 조회 576
10년 전 조회 515
10년 전 조회 542
10년 전 조회 872
10년 전 조회 463
10년 전 조회 562
10년 전 조회 724
10년 전 조회 635
10년 전 조회 1,346
10년 전 조회 1,154
10년 전 조회 618
10년 전 조회 543
10년 전 조회 872
10년 전 조회 601
10년 전 조회 501
10년 전 조회 557
10년 전 조회 494
10년 전 조회 542
10년 전 조회 481
10년 전 조회 712
10년 전 조회 2,562
10년 전 조회 699
10년 전 조회 429
10년 전 조회 481
10년 전 조회 512
10년 전 조회 1,820
10년 전 조회 1,747
10년 전 조회 1,126
10년 전 조회 1,425
10년 전 조회 1,561
10년 전 조회 1,514
10년 전 조회 897
🐛 버그신고