로컬에서 자바스크립트 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,402
10년 전 조회 1,293
10년 전 조회 832
10년 전 조회 1,432
10년 전 조회 485
10년 전 조회 929
10년 전 조회 1,130
10년 전 조회 582
10년 전 조회 538
10년 전 조회 534
10년 전 조회 379
10년 전 조회 553
10년 전 조회 553
10년 전 조회 1,085
10년 전 조회 489
10년 전 조회 576
10년 전 조회 538
10년 전 조회 1,474
10년 전 조회 576
10년 전 조회 439
10년 전 조회 577
10년 전 조회 602
10년 전 조회 672
10년 전 조회 469
10년 전 조회 530
10년 전 조회 928
10년 전 조회 857
10년 전 조회 845
10년 전 조회 387
10년 전 조회 482
10년 전 조회 478
10년 전 조회 414
10년 전 조회 688
10년 전 조회 417
10년 전 조회 749
10년 전 조회 417
10년 전 조회 715
10년 전 조회 401
10년 전 조회 629
10년 전 조회 1,207
10년 전 조회 524
10년 전 조회 547
10년 전 조회 400
10년 전 조회 1,476
10년 전 조회 1,103
10년 전 조회 707
10년 전 조회 658
10년 전 조회 465
10년 전 조회 584
10년 전 조회 1,252
10년 전 조회 1,286
10년 전 조회 1,966
10년 전 조회 1,040
10년 전 조회 922
10년 전 조회 1,418
10년 전 조회 545
10년 전 조회 516
10년 전 조회 511
10년 전 조회 494
10년 전 조회 589
10년 전 조회 702
10년 전 조회 935
10년 전 조회 463
10년 전 조회 1,014
10년 전 조회 867
10년 전 조회 670
10년 전 조회 543
10년 전 조회 512
10년 전 조회 581
10년 전 조회 517
10년 전 조회 542
10년 전 조회 874
10년 전 조회 465
10년 전 조회 566
10년 전 조회 728
10년 전 조회 639
10년 전 조회 1,351
10년 전 조회 1,160
10년 전 조회 623
10년 전 조회 548
10년 전 조회 875
10년 전 조회 602
10년 전 조회 508
10년 전 조회 563
10년 전 조회 501
10년 전 조회 544
10년 전 조회 486
10년 전 조회 718
10년 전 조회 2,566
10년 전 조회 702
10년 전 조회 432
10년 전 조회 485
10년 전 조회 515
10년 전 조회 1,824
10년 전 조회 1,749
10년 전 조회 1,131
10년 전 조회 1,428
10년 전 조회 1,563
10년 전 조회 1,518
10년 전 조회 901
🐛 버그신고