로컬에서 자바스크립트 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,366
10년 전 조회 1,265
10년 전 조회 805
10년 전 조회 1,403
10년 전 조회 455
10년 전 조회 903
10년 전 조회 1,099
10년 전 조회 547
10년 전 조회 504
10년 전 조회 501
10년 전 조회 356
10년 전 조회 516
10년 전 조회 524
10년 전 조회 1,052
10년 전 조회 459
10년 전 조회 534
10년 전 조회 510
10년 전 조회 1,437
10년 전 조회 543
10년 전 조회 405
10년 전 조회 543
10년 전 조회 567
10년 전 조회 637
10년 전 조회 439
10년 전 조회 491
10년 전 조회 893
10년 전 조회 831
10년 전 조회 808
10년 전 조회 360
10년 전 조회 448
10년 전 조회 447
10년 전 조회 388
10년 전 조회 650
10년 전 조회 375
10년 전 조회 719
10년 전 조회 376
10년 전 조회 672
10년 전 조회 372
10년 전 조회 596
10년 전 조회 1,166
10년 전 조회 485
10년 전 조회 512
10년 전 조회 365
10년 전 조회 1,435
10년 전 조회 1,072
10년 전 조회 666
10년 전 조회 625
10년 전 조회 435
10년 전 조회 555
10년 전 조회 1,222
10년 전 조회 1,254
10년 전 조회 1,924
10년 전 조회 1,002
10년 전 조회 883
10년 전 조회 1,382
10년 전 조회 501
10년 전 조회 476
10년 전 조회 478
10년 전 조회 458
10년 전 조회 544
10년 전 조회 670
10년 전 조회 903
10년 전 조회 435
10년 전 조회 966
10년 전 조회 831
10년 전 조회 639
10년 전 조회 504
10년 전 조회 477
10년 전 조회 536
10년 전 조회 485
10년 전 조회 506
10년 전 조회 835
10년 전 조회 431
10년 전 조회 532
10년 전 조회 691
10년 전 조회 600
10년 전 조회 1,320
10년 전 조회 1,130
10년 전 조회 587
10년 전 조회 503
10년 전 조회 840
10년 전 조회 564
10년 전 조회 466
10년 전 조회 526
10년 전 조회 463
10년 전 조회 510
10년 전 조회 443
10년 전 조회 681
10년 전 조회 2,531
10년 전 조회 665
10년 전 조회 394
10년 전 조회 442
10년 전 조회 479
10년 전 조회 1,782
10년 전 조회 1,712
10년 전 조회 1,095
10년 전 조회 1,390
10년 전 조회 1,520
10년 전 조회 1,481
10년 전 조회 858
🐛 버그신고