로컬에서 자바스크립트 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,411
10년 전 조회 1,299
10년 전 조회 840
10년 전 조회 1,441
10년 전 조회 493
10년 전 조회 941
10년 전 조회 1,141
10년 전 조회 591
10년 전 조회 546
10년 전 조회 540
10년 전 조회 387
10년 전 조회 562
10년 전 조회 561
10년 전 조회 1,092
10년 전 조회 498
10년 전 조회 582
10년 전 조회 550
10년 전 조회 1,480
10년 전 조회 582
10년 전 조회 443
10년 전 조회 591
10년 전 조회 609
10년 전 조회 682
10년 전 조회 479
10년 전 조회 541
10년 전 조회 938
10년 전 조회 864
10년 전 조회 858
10년 전 조회 399
10년 전 조회 494
10년 전 조회 486
10년 전 조회 426
10년 전 조회 700
10년 전 조회 424
10년 전 조회 762
10년 전 조회 427
10년 전 조회 729
10년 전 조회 411
10년 전 조회 641
10년 전 조회 1,214
10년 전 조회 532
10년 전 조회 557
10년 전 조회 412
10년 전 조회 1,486
10년 전 조회 1,117
10년 전 조회 712
10년 전 조회 669
10년 전 조회 475
10년 전 조회 594
10년 전 조회 1,263
10년 전 조회 1,294
10년 전 조회 1,974
10년 전 조회 1,049
10년 전 조회 932
10년 전 조회 1,432
10년 전 조회 554
10년 전 조회 526
10년 전 조회 515
10년 전 조회 499
10년 전 조회 599
10년 전 조회 708
10년 전 조회 944
10년 전 조회 474
10년 전 조회 1,025
10년 전 조회 878
10년 전 조회 682
10년 전 조회 553
10년 전 조회 523
10년 전 조회 591
10년 전 조회 526
10년 전 조회 551
10년 전 조회 883
10년 전 조회 479
10년 전 조회 578
10년 전 조회 738
10년 전 조회 652
10년 전 조회 1,364
10년 전 조회 1,174
10년 전 조회 633
10년 전 조회 561
10년 전 조회 889
10년 전 조회 618
10년 전 조회 518
10년 전 조회 576
10년 전 조회 517
10년 전 조회 556
10년 전 조회 499
10년 전 조회 731
10년 전 조회 2,579
10년 전 조회 715
10년 전 조회 447
10년 전 조회 498
10년 전 조회 531
10년 전 조회 1,840
10년 전 조회 1,758
10년 전 조회 1,143
10년 전 조회 1,442
10년 전 조회 1,576
10년 전 조회 1,529
10년 전 조회 918
🐛 버그신고