로컬에서 자바스크립트 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,355
10년 전 조회 1,255
10년 전 조회 795
10년 전 조회 1,393
10년 전 조회 447
10년 전 조회 889
10년 전 조회 1,092
10년 전 조회 543
10년 전 조회 499
10년 전 조회 493
10년 전 조회 347
10년 전 조회 504
10년 전 조회 513
10년 전 조회 1,043
10년 전 조회 449
10년 전 조회 527
10년 전 조회 498
10년 전 조회 1,431
10년 전 조회 534
10년 전 조회 398
10년 전 조회 535
10년 전 조회 559
10년 전 조회 631
10년 전 조회 431
10년 전 조회 484
10년 전 조회 885
10년 전 조회 824
10년 전 조회 798
10년 전 조회 352
10년 전 조회 437
10년 전 조회 439
10년 전 조회 381
10년 전 조회 642
10년 전 조회 364
10년 전 조회 711
10년 전 조회 365
10년 전 조회 662
10년 전 조회 365
10년 전 조회 587
10년 전 조회 1,158
10년 전 조회 476
10년 전 조회 504
10년 전 조회 359
10년 전 조회 1,425
10년 전 조회 1,064
10년 전 조회 660
10년 전 조회 614
10년 전 조회 428
10년 전 조회 548
10년 전 조회 1,211
10년 전 조회 1,248
10년 전 조회 1,916
10년 전 조회 996
10년 전 조회 872
10년 전 조회 1,377
10년 전 조회 497
10년 전 조회 469
10년 전 조회 467
10년 전 조회 450
10년 전 조회 535
10년 전 조회 662
10년 전 조회 894
10년 전 조회 429
10년 전 조회 960
10년 전 조회 820
10년 전 조회 633
10년 전 조회 498
10년 전 조회 469
10년 전 조회 530
10년 전 조회 477
10년 전 조회 499
10년 전 조회 828
10년 전 조회 422
10년 전 조회 523
10년 전 조회 681
10년 전 조회 589
10년 전 조회 1,311
10년 전 조회 1,121
10년 전 조회 579
10년 전 조회 494
10년 전 조회 829
10년 전 조회 553
10년 전 조회 459
10년 전 조회 517
10년 전 조회 454
10년 전 조회 502
10년 전 조회 434
10년 전 조회 670
10년 전 조회 2,524
10년 전 조회 654
10년 전 조회 383
10년 전 조회 430
10년 전 조회 466
10년 전 조회 1,773
10년 전 조회 1,700
10년 전 조회 1,087
10년 전 조회 1,380
10년 전 조회 1,511
10년 전 조회 1,467
10년 전 조회 848
🐛 버그신고