로컬에서 자바스크립트 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,135
10년 전 조회 1,702
10년 전 조회 2,261
10년 전 조회 1,324
10년 전 조회 1,761
10년 전 조회 1,984
10년 전 조회 1,460
10년 전 조회 1,430
10년 전 조회 1,400
10년 전 조회 1,261
10년 전 조회 1,436
10년 전 조회 1,436
10년 전 조회 1,945
10년 전 조회 1,373
10년 전 조회 1,425
10년 전 조회 1,454
10년 전 조회 2,352
10년 전 조회 1,496
10년 전 조회 1,379
10년 전 조회 1,467
10년 전 조회 1,509
10년 전 조회 1,592
10년 전 조회 1,382
10년 전 조회 1,447
10년 전 조회 1,785
10년 전 조회 1,741
10년 전 조회 1,711
10년 전 조회 1,263
10년 전 조회 1,392
10년 전 조회 1,348
10년 전 조회 1,287
10년 전 조회 1,510
10년 전 조회 1,291
10년 전 조회 1,596
10년 전 조회 1,276
10년 전 조회 1,593
10년 전 조회 1,280
10년 전 조회 1,531
10년 전 조회 2,111
10년 전 조회 1,455
10년 전 조회 1,516
10년 전 조회 1,334
10년 전 조회 2,420
10년 전 조회 2,020
10년 전 조회 1,619
10년 전 조회 1,547
10년 전 조회 1,373
10년 전 조회 1,506
10년 전 조회 2,178
10년 전 조회 2,218
10년 전 조회 2,853
10년 전 조회 1,993
10년 전 조회 1,844
10년 전 조회 2,358
10년 전 조회 1,480
10년 전 조회 1,462
10년 전 조회 1,425
10년 전 조회 1,446
10년 전 조회 1,508
10년 전 조회 1,621
10년 전 조회 1,841
10년 전 조회 1,390
10년 전 조회 1,885
10년 전 조회 1,841
10년 전 조회 1,582
10년 전 조회 1,452
10년 전 조회 1,438
10년 전 조회 1,493
10년 전 조회 1,471
10년 전 조회 1,456
10년 전 조회 1,794
10년 전 조회 1,358
10년 전 조회 1,468
10년 전 조회 1,641
10년 전 조회 1,534
10년 전 조회 2,253
10년 전 조회 2,080
10년 전 조회 1,522
10년 전 조회 1,488
10년 전 조회 1,761
10년 전 조회 1,522
10년 전 조회 1,394
10년 전 조회 1,464
10년 전 조회 1,422
10년 전 조회 1,437
10년 전 조회 1,409
10년 전 조회 1,632
10년 전 조회 3,487
10년 전 조회 1,603
10년 전 조회 1,365
10년 전 조회 1,420
10년 전 조회 1,442
10년 전 조회 2,765
10년 전 조회 2,657
10년 전 조회 2,050
10년 전 조회 2,359
10년 전 조회 2,501
10년 전 조회 2,443
10년 전 조회 1,810