로컬에서 자바스크립트 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,301
10년 전 조회 1,191
10년 전 조회 734
10년 전 조회 1,338
10년 전 조회 386
10년 전 조회 821
10년 전 조회 1,034
10년 전 조회 490
10년 전 조회 440
10년 전 조회 437
10년 전 조회 293
10년 전 조회 439
10년 전 조회 462
10년 전 조회 989
10년 전 조회 392
10년 전 조회 466
10년 전 조회 447
10년 전 조회 1,367
10년 전 조회 471
10년 전 조회 331
10년 전 조회 483
10년 전 조회 503
10년 전 조회 576
10년 전 조회 377
10년 전 조회 434
10년 전 조회 835
10년 전 조회 765
10년 전 조회 740
10년 전 조회 297
10년 전 조회 382
10년 전 조회 384
10년 전 조회 327
10년 전 조회 594
10년 전 조회 318
10년 전 조회 653
10년 전 조회 314
10년 전 조회 611
10년 전 조회 315
10년 전 조회 536
10년 전 조회 1,106
10년 전 조회 432
10년 전 조회 449
10년 전 조회 315
10년 전 조회 1,385
10년 전 조회 1,019
10년 전 조회 614
10년 전 조회 568
10년 전 조회 385
10년 전 조회 501
10년 전 조회 1,162
10년 전 조회 1,198
10년 전 조회 1,867
10년 전 조회 951
10년 전 조회 826
10년 전 조회 1,331
10년 전 조회 448
10년 전 조회 426
10년 전 조회 421
10년 전 조회 403
10년 전 조회 491
10년 전 조회 614
10년 전 조회 846
10년 전 조회 385
10년 전 조회 911
10년 전 조회 779
10년 전 조회 586
10년 전 조회 453
10년 전 조회 423
10년 전 조회 483
10년 전 조회 434
10년 전 조회 456
10년 전 조회 786
10년 전 조회 382
10년 전 조회 472
10년 전 조회 635
10년 전 조회 557
10년 전 조회 1,266
10년 전 조회 1,078
10년 전 조회 544
10년 전 조회 452
10년 전 조회 787
10년 전 조회 513
10년 전 조회 422
10년 전 조회 482
10년 전 조회 419
10년 전 조회 461
10년 전 조회 404
10년 전 조회 647
10년 전 조회 2,494
10년 전 조회 622
10년 전 조회 355
10년 전 조회 403
10년 전 조회 437
10년 전 조회 1,737
10년 전 조회 1,664
10년 전 조회 1,054
10년 전 조회 1,346
10년 전 조회 1,477
10년 전 조회 1,435
10년 전 조회 820
🐛 버그신고