로컬에서 자바스크립트 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,307
10년 전 조회 1,198
10년 전 조회 738
10년 전 조회 1,348
10년 전 조회 391
10년 전 조회 828
10년 전 조회 1,040
10년 전 조회 496
10년 전 조회 445
10년 전 조회 446
10년 전 조회 296
10년 전 조회 447
10년 전 조회 468
10년 전 조회 994
10년 전 조회 396
10년 전 조회 471
10년 전 조회 452
10년 전 조회 1,375
10년 전 조회 480
10년 전 조회 336
10년 전 조회 491
10년 전 조회 510
10년 전 조회 584
10년 전 조회 382
10년 전 조회 439
10년 전 조회 840
10년 전 조회 772
10년 전 조회 749
10년 전 조회 303
10년 전 조회 390
10년 전 조회 393
10년 전 조회 334
10년 전 조회 600
10년 전 조회 323
10년 전 조회 662
10년 전 조회 320
10년 전 조회 618
10년 전 조회 322
10년 전 조회 544
10년 전 조회 1,113
10년 전 조회 438
10년 전 조회 458
10년 전 조회 324
10년 전 조회 1,389
10년 전 조회 1,025
10년 전 조회 618
10년 전 조회 574
10년 전 조회 392
10년 전 조회 509
10년 전 조회 1,167
10년 전 조회 1,208
10년 전 조회 1,877
10년 전 조회 957
10년 전 조회 838
10년 전 조회 1,339
10년 전 조회 455
10년 전 조회 427
10년 전 조회 429
10년 전 조회 413
10년 전 조회 497
10년 전 조회 624
10년 전 조회 857
10년 전 조회 394
10년 전 조회 920
10년 전 조회 785
10년 전 조회 597
10년 전 조회 458
10년 전 조회 428
10년 전 조회 492
10년 전 조회 443
10년 전 조회 461
10년 전 조회 791
10년 전 조회 390
10년 전 조회 482
10년 전 조회 646
10년 전 조회 564
10년 전 조회 1,275
10년 전 조회 1,085
10년 전 조회 548
10년 전 조회 462
10년 전 조회 793
10년 전 조회 521
10년 전 조회 426
10년 전 조회 487
10년 전 조회 425
10년 전 조회 469
10년 전 조회 411
10년 전 조회 651
10년 전 조회 2,500
10년 전 조회 626
10년 전 조회 356
10년 전 조회 409
10년 전 조회 442
10년 전 조회 1,742
10년 전 조회 1,672
10년 전 조회 1,061
10년 전 조회 1,353
10년 전 조회 1,482
10년 전 조회 1,440
10년 전 조회 827
🐛 버그신고