로컬에서 자바스크립트 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,318
10년 전 조회 1,217
10년 전 조회 754
10년 전 조회 1,358
10년 전 조회 409
10년 전 조회 845
10년 전 조회 1,054
10년 전 조회 511
10년 전 조회 462
10년 전 조회 455
10년 전 조회 309
10년 전 조회 462
10년 전 조회 479
10년 전 조회 1,004
10년 전 조회 409
10년 전 조회 485
10년 전 조회 463
10년 전 조회 1,392
10년 전 조회 490
10년 전 조회 353
10년 전 조회 500
10년 전 조회 523
10년 전 조회 593
10년 전 조회 398
10년 전 조회 449
10년 전 조회 851
10년 전 조회 781
10년 전 조회 755
10년 전 조회 313
10년 전 조회 398
10년 전 조회 401
10년 전 조회 338
10년 전 조회 613
10년 전 조회 333
10년 전 조회 669
10년 전 조회 331
10년 전 조회 628
10년 전 조회 327
10년 전 조회 552
10년 전 조회 1,123
10년 전 조회 444
10년 전 조회 462
10년 전 조회 328
10년 전 조회 1,392
10년 전 조회 1,034
10년 전 조회 626
10년 전 조회 583
10년 전 조회 396
10년 전 조회 514
10년 전 조회 1,176
10년 전 조회 1,214
10년 전 조회 1,884
10년 전 조회 964
10년 전 조회 844
10년 전 조회 1,343
10년 전 조회 464
10년 전 조회 433
10년 전 조회 435
10년 전 조회 418
10년 전 조회 504
10년 전 조회 628
10년 전 조회 860
10년 전 조회 400
10년 전 조회 925
10년 전 조회 791
10년 전 조회 603
10년 전 조회 466
10년 전 조회 435
10년 전 조회 501
10년 전 조회 452
10년 전 조회 470
10년 전 조회 801
10년 전 조회 398
10년 전 조회 487
10년 전 조회 651
10년 전 조회 568
10년 전 조회 1,282
10년 전 조회 1,091
10년 전 조회 555
10년 전 조회 470
10년 전 조회 804
10년 전 조회 526
10년 전 조회 437
10년 전 조회 494
10년 전 조회 430
10년 전 조회 478
10년 전 조회 417
10년 전 조회 654
10년 전 조회 2,503
10년 전 조회 634
10년 전 조회 365
10년 전 조회 413
10년 전 조회 444
10년 전 조회 1,749
10년 전 조회 1,681
10년 전 조회 1,067
10년 전 조회 1,360
10년 전 조회 1,490
10년 전 조회 1,443
10년 전 조회 834
🐛 버그신고