로컬에서 자바스크립트 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,193
10년 전 조회 737
10년 전 조회 1,342
10년 전 조회 388
10년 전 조회 823
10년 전 조회 1,039
10년 전 조회 494
10년 전 조회 443
10년 전 조회 442
10년 전 조회 295
10년 전 조회 442
10년 전 조회 465
10년 전 조회 991
10년 전 조회 393
10년 전 조회 467
10년 전 조회 448
10년 전 조회 1,372
10년 전 조회 474
10년 전 조회 332
10년 전 조회 486
10년 전 조회 505
10년 전 조회 580
10년 전 조회 377
10년 전 조회 438
10년 전 조회 836
10년 전 조회 768
10년 전 조회 744
10년 전 조회 299
10년 전 조회 385
10년 전 조회 389
10년 전 조회 330
10년 전 조회 598
10년 전 조회 318
10년 전 조회 655
10년 전 조회 317
10년 전 조회 614
10년 전 조회 318
10년 전 조회 540
10년 전 조회 1,109
10년 전 조회 433
10년 전 조회 454
10년 전 조회 317
10년 전 조회 1,386
10년 전 조회 1,019
10년 전 조회 616
10년 전 조회 571
10년 전 조회 386
10년 전 조회 502
10년 전 조회 1,163
10년 전 조회 1,203
10년 전 조회 1,871
10년 전 조회 954
10년 전 조회 830
10년 전 조회 1,336
10년 전 조회 451
10년 전 조회 427
10년 전 조회 422
10년 전 조회 405
10년 전 조회 493
10년 전 조회 616
10년 전 조회 850
10년 전 조회 389
10년 전 조회 913
10년 전 조회 780
10년 전 조회 590
10년 전 조회 456
10년 전 조회 427
10년 전 조회 484
10년 전 조회 438
10년 전 조회 460
10년 전 조회 787
10년 전 조회 387
10년 전 조회 475
10년 전 조회 639
10년 전 조회 559
10년 전 조회 1,268
10년 전 조회 1,080
10년 전 조회 546
10년 전 조회 458
10년 전 조회 789
10년 전 조회 516
10년 전 조회 424
10년 전 조회 485
10년 전 조회 423
10년 전 조회 464
10년 전 조회 407
10년 전 조회 649
10년 전 조회 2,497
10년 전 조회 623
10년 전 조회 356
10년 전 조회 404
10년 전 조회 440
10년 전 조회 1,738
10년 전 조회 1,668
10년 전 조회 1,057
10년 전 조회 1,348
10년 전 조회 1,478
10년 전 조회 1,439
10년 전 조회 823
🐛 버그신고