로컬에서 자바스크립트 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,409
10년 전 조회 1,297
10년 전 조회 836
10년 전 조회 1,438
10년 전 조회 490
10년 전 조회 939
10년 전 조회 1,138
10년 전 조회 588
10년 전 조회 544
10년 전 조회 538
10년 전 조회 385
10년 전 조회 561
10년 전 조회 559
10년 전 조회 1,092
10년 전 조회 496
10년 전 조회 579
10년 전 조회 545
10년 전 조회 1,477
10년 전 조회 581
10년 전 조회 442
10년 전 조회 588
10년 전 조회 608
10년 전 조회 681
10년 전 조회 479
10년 전 조회 538
10년 전 조회 937
10년 전 조회 862
10년 전 조회 854
10년 전 조회 396
10년 전 조회 491
10년 전 조회 483
10년 전 조회 421
10년 전 조회 697
10년 전 조회 422
10년 전 조회 760
10년 전 조회 426
10년 전 조회 723
10년 전 조회 409
10년 전 조회 638
10년 전 조회 1,211
10년 전 조회 530
10년 전 조회 554
10년 전 조회 409
10년 전 조회 1,484
10년 전 조회 1,112
10년 전 조회 710
10년 전 조회 667
10년 전 조회 473
10년 전 조회 591
10년 전 조회 1,262
10년 전 조회 1,292
10년 전 조회 1,971
10년 전 조회 1,047
10년 전 조회 928
10년 전 조회 1,431
10년 전 조회 552
10년 전 조회 525
10년 전 조회 514
10년 전 조회 498
10년 전 조회 596
10년 전 조회 706
10년 전 조회 940
10년 전 조회 470
10년 전 조회 1,018
10년 전 조회 875
10년 전 조회 680
10년 전 조회 549
10년 전 조회 520
10년 전 조회 588
10년 전 조회 524
10년 전 조회 549
10년 전 조회 880
10년 전 조회 475
10년 전 조회 577
10년 전 조회 735
10년 전 조회 648
10년 전 조회 1,362
10년 전 조회 1,173
10년 전 조회 629
10년 전 조회 558
10년 전 조회 884
10년 전 조회 614
10년 전 조회 516
10년 전 조회 572
10년 전 조회 513
10년 전 조회 551
10년 전 조회 494
10년 전 조회 726
10년 전 조회 2,577
10년 전 조회 712
10년 전 조회 444
10년 전 조회 495
10년 전 조회 527
10년 전 조회 1,836
10년 전 조회 1,756
10년 전 조회 1,139
10년 전 조회 1,436
10년 전 조회 1,573
10년 전 조회 1,524
10년 전 조회 913
🐛 버그신고