로컬에서 자바스크립트 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,345
10년 전 조회 1,242
10년 전 조회 781
10년 전 조회 1,384
10년 전 조회 433
10년 전 조회 872
10년 전 조회 1,080
10년 전 조회 533
10년 전 조회 485
10년 전 조회 482
10년 전 조회 336
10년 전 조회 494
10년 전 조회 504
10년 전 조회 1,033
10년 전 조회 438
10년 전 조회 511
10년 전 조회 489
10년 전 조회 1,418
10년 전 조회 515
10년 전 조회 388
10년 전 조회 523
10년 전 조회 550
10년 전 조회 616
10년 전 조회 420
10년 전 조회 472
10년 전 조회 875
10년 전 조회 804
10년 전 조회 782
10년 전 조회 341
10년 전 조회 424
10년 전 조회 422
10년 전 조회 364
10년 전 조회 633
10년 전 조회 352
10년 전 조회 697
10년 전 조회 355
10년 전 조회 652
10년 전 조회 349
10년 전 조회 574
10년 전 조회 1,147
10년 전 조회 465
10년 전 조회 486
10년 전 조회 352
10년 전 조회 1,414
10년 전 조회 1,052
10년 전 조회 647
10년 전 조회 603
10년 전 조회 413
10년 전 조회 534
10년 전 조회 1,197
10년 전 조회 1,231
10년 전 조회 1,899
10년 전 조회 984
10년 전 조회 857
10년 전 조회 1,364
10년 전 조회 483
10년 전 조회 456
10년 전 조회 454
10년 전 조회 438
10년 전 조회 525
10년 전 조회 647
10년 전 조회 881
10년 전 조회 419
10년 전 조회 950
10년 전 조회 806
10년 전 조회 622
10년 전 조회 486
10년 전 조회 450
10년 전 조회 519
10년 전 조회 466
10년 전 조회 483
10년 전 조회 818
10년 전 조회 410
10년 전 조회 507
10년 전 조회 668
10년 전 조회 577
10년 전 조회 1,297
10년 전 조회 1,106
10년 전 조회 567
10년 전 조회 481
10년 전 조회 820
10년 전 조회 537
10년 전 조회 447
10년 전 조회 504
10년 전 조회 441
10년 전 조회 487
10년 전 조회 424
10년 전 조회 661
10년 전 조회 2,512
10년 전 조회 646
10년 전 조회 374
10년 전 조회 422
10년 전 조회 456
10년 전 조회 1,764
10년 전 조회 1,687
10년 전 조회 1,074
10년 전 조회 1,366
10년 전 조회 1,501
10년 전 조회 1,456
10년 전 조회 841
🐛 버그신고