로컬에서 자바스크립트 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,303
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년 전 조회 507
10년 전 조회 581
10년 전 조회 377
10년 전 조회 438
10년 전 조회 838
10년 전 조회 768
10년 전 조회 745
10년 전 조회 300
10년 전 조회 386
10년 전 조회 389
10년 전 조회 330
10년 전 조회 599
10년 전 조회 319
10년 전 조회 657
10년 전 조회 319
10년 전 조회 616
10년 전 조회 318
10년 전 조회 540
10년 전 조회 1,111
10년 전 조회 434
10년 전 조회 454
10년 전 조회 319
10년 전 조회 1,387
10년 전 조회 1,020
10년 전 조회 617
10년 전 조회 572
10년 전 조회 387
10년 전 조회 503
10년 전 조회 1,165
10년 전 조회 1,205
10년 전 조회 1,873
10년 전 조회 955
10년 전 조회 833
10년 전 조회 1,336
10년 전 조회 453
10년 전 조회 427
10년 전 조회 424
10년 전 조회 406
10년 전 조회 495
10년 전 조회 618
10년 전 조회 851
10년 전 조회 390
10년 전 조회 915
10년 전 조회 782
10년 전 조회 593
10년 전 조회 457
10년 전 조회 427
10년 전 조회 487
10년 전 조회 440
10년 전 조회 460
10년 전 조회 789
10년 전 조회 389
10년 전 조회 477
10년 전 조회 641
10년 전 조회 560
10년 전 조회 1,269
10년 전 조회 1,081
10년 전 조회 547
10년 전 조회 459
10년 전 조회 791
10년 전 조회 517
10년 전 조회 425
10년 전 조회 485
10년 전 조회 423
10년 전 조회 466
10년 전 조회 408
10년 전 조회 649
10년 전 조회 2,498
10년 전 조회 625
10년 전 조회 356
10년 전 조회 405
10년 전 조회 442
10년 전 조회 1,740
10년 전 조회 1,670
10년 전 조회 1,059
10년 전 조회 1,351
10년 전 조회 1,480
10년 전 조회 1,439
10년 전 조회 824
🐛 버그신고