로컬에서 자바스크립트 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,302
10년 전 조회 1,194
10년 전 조회 737
10년 전 조회 1,343
10년 전 조회 389
10년 전 조회 825
10년 전 조회 1,040
10년 전 조회 494
10년 전 조회 444
10년 전 조회 443
10년 전 조회 296
10년 전 조회 443
10년 전 조회 466
10년 전 조회 992
10년 전 조회 394
10년 전 조회 467
10년 전 조회 449
10년 전 조회 1,372
10년 전 조회 475
10년 전 조회 333
10년 전 조회 487
10년 전 조회 506
10년 전 조회 581
10년 전 조회 377
10년 전 조회 438
10년 전 조회 837
10년 전 조회 768
10년 전 조회 744
10년 전 조회 300
10년 전 조회 385
10년 전 조회 389
10년 전 조회 330
10년 전 조회 599
10년 전 조회 318
10년 전 조회 656
10년 전 조회 318
10년 전 조회 615
10년 전 조회 318
10년 전 조회 540
10년 전 조회 1,109
10년 전 조회 434
10년 전 조회 454
10년 전 조회 317
10년 전 조회 1,387
10년 전 조회 1,019
10년 전 조회 617
10년 전 조회 571
10년 전 조회 387
10년 전 조회 503
10년 전 조회 1,164
10년 전 조회 1,203
10년 전 조회 1,871
10년 전 조회 955
10년 전 조회 831
10년 전 조회 1,336
10년 전 조회 451
10년 전 조회 427
10년 전 조회 422
10년 전 조회 405
10년 전 조회 494
10년 전 조회 616
10년 전 조회 850
10년 전 조회 389
10년 전 조회 915
10년 전 조회 781
10년 전 조회 591
10년 전 조회 457
10년 전 조회 427
10년 전 조회 486
10년 전 조회 439
10년 전 조회 460
10년 전 조회 788
10년 전 조회 388
10년 전 조회 476
10년 전 조회 640
10년 전 조회 559
10년 전 조회 1,269
10년 전 조회 1,081
10년 전 조회 547
10년 전 조회 459
10년 전 조회 791
10년 전 조회 517
10년 전 조회 425
10년 전 조회 485
10년 전 조회 423
10년 전 조회 465
10년 전 조회 408
10년 전 조회 649
10년 전 조회 2,498
10년 전 조회 624
10년 전 조회 356
10년 전 조회 404
10년 전 조회 441
10년 전 조회 1,739
10년 전 조회 1,669
10년 전 조회 1,058
10년 전 조회 1,349
10년 전 조회 1,479
10년 전 조회 1,439
10년 전 조회 824
🐛 버그신고