로컬에서 자바스크립트 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,333
10년 전 조회 1,229
10년 전 조회 767
10년 전 조회 1,373
10년 전 조회 421
10년 전 조회 859
10년 전 조회 1,070
10년 전 조회 526
10년 전 조회 474
10년 전 조회 471
10년 전 조회 323
10년 전 조회 480
10년 전 조회 492
10년 전 조회 1,019
10년 전 조회 425
10년 전 조회 501
10년 전 조회 479
10년 전 조회 1,405
10년 전 조회 502
10년 전 조회 375
10년 전 조회 515
10년 전 조회 540
10년 전 조회 606
10년 전 조회 410
10년 전 조회 462
10년 전 조회 864
10년 전 조회 792
10년 전 조회 771
10년 전 조회 332
10년 전 조회 411
10년 전 조회 410
10년 전 조회 350
10년 전 조회 621
10년 전 조회 339
10년 전 조회 686
10년 전 조회 345
10년 전 조회 640
10년 전 조회 337
10년 전 조회 562
10년 전 조회 1,134
10년 전 조회 453
10년 전 조회 471
10년 전 조회 343
10년 전 조회 1,402
10년 전 조회 1,042
10년 전 조회 635
10년 전 조회 592
10년 전 조회 405
10년 전 조회 526
10년 전 조회 1,187
10년 전 조회 1,221
10년 전 조회 1,890
10년 전 조회 974
10년 전 조회 849
10년 전 조회 1,354
10년 전 조회 472
10년 전 조회 446
10년 전 조회 443
10년 전 조회 429
10년 전 조회 514
10년 전 조회 638
10년 전 조회 871
10년 전 조회 411
10년 전 조회 936
10년 전 조회 799
10년 전 조회 612
10년 전 조회 476
10년 전 조회 442
10년 전 조회 507
10년 전 조회 461
10년 전 조회 478
10년 전 조회 810
10년 전 조회 404
10년 전 조회 498
10년 전 조회 660
10년 전 조회 573
10년 전 조회 1,289
10년 전 조회 1,098
10년 전 조회 559
10년 전 조회 472
10년 전 조회 810
10년 전 조회 534
10년 전 조회 440
10년 전 조회 498
10년 전 조회 436
10년 전 조회 482
10년 전 조회 422
10년 전 조회 656
10년 전 조회 2,507
10년 전 조회 639
10년 전 조회 368
10년 전 조회 416
10년 전 조회 451
10년 전 조회 1,755
10년 전 조회 1,682
10년 전 조회 1,069
10년 전 조회 1,361
10년 전 조회 1,493
10년 전 조회 1,448
10년 전 조회 838
🐛 버그신고