로컬에서 자바스크립트 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,291
10년 전 조회 1,185
10년 전 조회 724
10년 전 조회 1,334
10년 전 조회 379
10년 전 조회 816
10년 전 조회 1,027
10년 전 조회 484
10년 전 조회 432
10년 전 조회 432
10년 전 조회 287
10년 전 조회 434
10년 전 조회 457
10년 전 조회 981
10년 전 조회 386
10년 전 조회 459
10년 전 조회 437
10년 전 조회 1,361
10년 전 조회 465
10년 전 조회 327
10년 전 조회 479
10년 전 조회 497
10년 전 조회 570
10년 전 조회 372
10년 전 조회 430
10년 전 조회 828
10년 전 조회 760
10년 전 조회 735
10년 전 조회 292
10년 전 조회 376
10년 전 조회 378
10년 전 조회 317
10년 전 조회 587
10년 전 조회 311
10년 전 조회 648
10년 전 조회 308
10년 전 조회 605
10년 전 조회 305
10년 전 조회 532
10년 전 조회 1,104
10년 전 조회 427
10년 전 조회 445
10년 전 조회 308
10년 전 조회 1,379
10년 전 조회 1,009
10년 전 조회 609
10년 전 조회 562
10년 전 조회 381
10년 전 조회 496
10년 전 조회 1,155
10년 전 조회 1,193
10년 전 조회 1,862
10년 전 조회 947
10년 전 조회 822
10년 전 조회 1,323
10년 전 조회 446
10년 전 조회 418
10년 전 조회 414
10년 전 조회 399
10년 전 조회 485
10년 전 조회 609
10년 전 조회 843
10년 전 조회 378
10년 전 조회 906
10년 전 조회 774
10년 전 조회 581
10년 전 조회 450
10년 전 조회 419
10년 전 조회 478
10년 전 조회 430
10년 전 조회 451
10년 전 조회 783
10년 전 조회 376
10년 전 조회 467
10년 전 조회 631
10년 전 조회 551
10년 전 조회 1,261
10년 전 조회 1,073
10년 전 조회 537
10년 전 조회 449
10년 전 조회 784
10년 전 조회 510
10년 전 조회 419
10년 전 조회 478
10년 전 조회 416
10년 전 조회 459
10년 전 조회 401
10년 전 조회 642
10년 전 조회 2,489
10년 전 조회 620
10년 전 조회 350
10년 전 조회 400
10년 전 조회 433
10년 전 조회 1,733
10년 전 조회 1,661
10년 전 조회 1,050
10년 전 조회 1,341
10년 전 조회 1,473
10년 전 조회 1,431
10년 전 조회 819
🐛 버그신고