로컬에서 자바스크립트 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년 전 조회 2,258
10년 전 조회 2,136
10년 전 조회 1,703
10년 전 조회 2,261
10년 전 조회 1,325
10년 전 조회 1,763
10년 전 조회 1,984
10년 전 조회 1,463
10년 전 조회 1,433
10년 전 조회 1,402
10년 전 조회 1,261
10년 전 조회 1,436
10년 전 조회 1,436
10년 전 조회 1,946
10년 전 조회 1,373
10년 전 조회 1,426
10년 전 조회 1,454
10년 전 조회 2,354
10년 전 조회 1,497
10년 전 조회 1,379
10년 전 조회 1,467
10년 전 조회 1,509
10년 전 조회 1,593
10년 전 조회 1,384
10년 전 조회 1,447
10년 전 조회 1,785
10년 전 조회 1,741
10년 전 조회 1,713
10년 전 조회 1,266
10년 전 조회 1,393
10년 전 조회 1,348
10년 전 조회 1,287
10년 전 조회 1,511
10년 전 조회 1,292
10년 전 조회 1,596
10년 전 조회 1,276
10년 전 조회 1,593
10년 전 조회 1,281
10년 전 조회 1,531
10년 전 조회 2,111
10년 전 조회 1,456
10년 전 조회 1,516
10년 전 조회 1,334
10년 전 조회 2,421
10년 전 조회 2,021
10년 전 조회 1,619
10년 전 조회 1,549
10년 전 조회 1,374
10년 전 조회 1,508
10년 전 조회 2,179
10년 전 조회 2,218
10년 전 조회 2,856
10년 전 조회 1,994
10년 전 조회 1,845
10년 전 조회 2,360
10년 전 조회 1,481
10년 전 조회 1,463
10년 전 조회 1,429
10년 전 조회 1,447
10년 전 조회 1,510
10년 전 조회 1,622
10년 전 조회 1,842
10년 전 조회 1,393
10년 전 조회 1,885
10년 전 조회 1,844
10년 전 조회 1,584
10년 전 조회 1,452
10년 전 조회 1,438
10년 전 조회 1,494
10년 전 조회 1,472
10년 전 조회 1,457
10년 전 조회 1,796
10년 전 조회 1,358
10년 전 조회 1,469
10년 전 조회 1,642
10년 전 조회 1,534
10년 전 조회 2,253
10년 전 조회 2,081
10년 전 조회 1,522
10년 전 조회 1,488
10년 전 조회 1,762
10년 전 조회 1,523
10년 전 조회 1,396
10년 전 조회 1,465
10년 전 조회 1,422
10년 전 조회 1,437
10년 전 조회 1,409
10년 전 조회 1,632
10년 전 조회 3,488
10년 전 조회 1,604
10년 전 조회 1,365
10년 전 조회 1,420
10년 전 조회 1,443
10년 전 조회 2,765
10년 전 조회 2,659
10년 전 조회 2,052
10년 전 조회 2,359
10년 전 조회 2,501
10년 전 조회 2,443
10년 전 조회 1,813