로컬에서 자바스크립트 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,348
10년 전 조회 1,248
10년 전 조회 786
10년 전 조회 1,386
10년 전 조회 439
10년 전 조회 878
10년 전 조회 1,084
10년 전 조회 539
10년 전 조회 489
10년 전 조회 489
10년 전 조회 341
10년 전 조회 499
10년 전 조회 505
10년 전 조회 1,036
10년 전 조회 444
10년 전 조회 518
10년 전 조회 493
10년 전 조회 1,421
10년 전 조회 522
10년 전 조회 391
10년 전 조회 529
10년 전 조회 553
10년 전 조회 620
10년 전 조회 423
10년 전 조회 476
10년 전 조회 878
10년 전 조회 812
10년 전 조회 788
10년 전 조회 344
10년 전 조회 426
10년 전 조회 429
10년 전 조회 371
10년 전 조회 635
10년 전 조회 356
10년 전 조회 702
10년 전 조회 357
10년 전 조회 655
10년 전 조회 355
10년 전 조회 580
10년 전 조회 1,153
10년 전 조회 469
10년 전 조회 494
10년 전 조회 355
10년 전 조회 1,418
10년 전 조회 1,057
10년 전 조회 652
10년 전 조회 607
10년 전 조회 415
10년 전 조회 538
10년 전 조회 1,202
10년 전 조회 1,240
10년 전 조회 1,907
10년 전 조회 987
10년 전 조회 864
10년 전 조회 1,370
10년 전 조회 490
10년 전 조회 460
10년 전 조회 460
10년 전 조회 444
10년 전 조회 527
10년 전 조회 653
10년 전 조회 885
10년 전 조회 422
10년 전 조회 954
10년 전 조회 811
10년 전 조회 628
10년 전 조회 491
10년 전 조회 456
10년 전 조회 521
10년 전 조회 472
10년 전 조회 488
10년 전 조회 822
10년 전 조회 417
10년 전 조회 516
10년 전 조회 673
10년 전 조회 580
10년 전 조회 1,303
10년 전 조회 1,113
10년 전 조회 573
10년 전 조회 487
10년 전 조회 823
10년 전 조회 541
10년 전 조회 453
10년 전 조회 510
10년 전 조회 445
10년 전 조회 498
10년 전 조회 425
10년 전 조회 665
10년 전 조회 2,517
10년 전 조회 648
10년 전 조회 377
10년 전 조회 425
10년 전 조회 460
10년 전 조회 1,766
10년 전 조회 1,694
10년 전 조회 1,081
10년 전 조회 1,375
10년 전 조회 1,506
10년 전 조회 1,462
10년 전 조회 843
🐛 버그신고