로컬에서 자바스크립트 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,296
10년 전 조회 1,186
10년 전 조회 726
10년 전 조회 1,336
10년 전 조회 381
10년 전 조회 819
10년 전 조회 1,031
10년 전 조회 486
10년 전 조회 437
10년 전 조회 433
10년 전 조회 288
10년 전 조회 434
10년 전 조회 459
10년 전 조회 984
10년 전 조회 386
10년 전 조회 464
10년 전 조회 440
10년 전 조회 1,363
10년 전 조회 466
10년 전 조회 327
10년 전 조회 480
10년 전 조회 499
10년 전 조회 573
10년 전 조회 374
10년 전 조회 431
10년 전 조회 829
10년 전 조회 762
10년 전 조회 737
10년 전 조회 292
10년 전 조회 379
10년 전 조회 380
10년 전 조회 321
10년 전 조회 589
10년 전 조회 313
10년 전 조회 649
10년 전 조회 312
10년 전 조회 607
10년 전 조회 309
10년 전 조회 535
10년 전 조회 1,106
10년 전 조회 429
10년 전 조회 447
10년 전 조회 311
10년 전 조회 1,382
10년 전 조회 1,013
10년 전 조회 612
10년 전 조회 566
10년 전 조회 383
10년 전 조회 498
10년 전 조회 1,159
10년 전 조회 1,195
10년 전 조회 1,864
10년 전 조회 949
10년 전 조회 823
10년 전 조회 1,327
10년 전 조회 447
10년 전 조회 421
10년 전 조회 416
10년 전 조회 400
10년 전 조회 488
10년 전 조회 612
10년 전 조회 845
10년 전 조회 382
10년 전 조회 908
10년 전 조회 777
10년 전 조회 583
10년 전 조회 451
10년 전 조회 421
10년 전 조회 481
10년 전 조회 433
10년 전 조회 453
10년 전 조회 784
10년 전 조회 379
10년 전 조회 469
10년 전 조회 632
10년 전 조회 552
10년 전 조회 1,264
10년 전 조회 1,077
10년 전 조회 541
10년 전 조회 452
10년 전 조회 786
10년 전 조회 512
10년 전 조회 421
10년 전 조회 481
10년 전 조회 418
10년 전 조회 460
10년 전 조회 402
10년 전 조회 646
10년 전 조회 2,492
10년 전 조회 620
10년 전 조회 350
10년 전 조회 401
10년 전 조회 436
10년 전 조회 1,735
10년 전 조회 1,662
10년 전 조회 1,052
10년 전 조회 1,341
10년 전 조회 1,475
10년 전 조회 1,431
10년 전 조회 819
🐛 버그신고