로컬에서 자바스크립트 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,396
10년 전 조회 1,286
10년 전 조회 826
10년 전 조회 1,421
10년 전 조회 480
10년 전 조회 924
10년 전 조회 1,126
10년 전 조회 577
10년 전 조회 534
10년 전 조회 530
10년 전 조회 375
10년 전 조회 546
10년 전 조회 543
10년 전 조회 1,081
10년 전 조회 485
10년 전 조회 565
10년 전 조회 532
10년 전 조회 1,463
10년 전 조회 568
10년 전 조회 434
10년 전 조회 570
10년 전 조회 597
10년 전 조회 663
10년 전 조회 461
10년 전 조회 523
10년 전 조회 920
10년 전 조회 851
10년 전 조회 840
10년 전 조회 381
10년 전 조회 477
10년 전 조회 466
10년 전 조회 406
10년 전 조회 677
10년 전 조회 408
10년 전 조회 745
10년 전 조회 410
10년 전 조회 707
10년 전 조회 391
10년 전 조회 619
10년 전 조회 1,196
10년 전 조회 517
10년 전 조회 539
10년 전 조회 394
10년 전 조회 1,469
10년 전 조회 1,097
10년 전 조회 701
10년 전 조회 649
10년 전 조회 455
10년 전 조회 575
10년 전 조회 1,246
10년 전 조회 1,277
10년 전 조회 1,953
10년 전 조회 1,031
10년 전 조회 904
10년 전 조회 1,415
10년 전 조회 535
10년 전 조회 507
10년 전 조회 505
10년 전 조회 486
10년 전 조회 580
10년 전 조회 694
10년 전 조회 931
10년 전 조회 458
10년 전 조회 1,002
10년 전 조회 863
10년 전 조회 662
10년 전 조회 538
10년 전 조회 507
10년 전 조회 571
10년 전 조회 509
10년 전 조회 538
10년 전 조회 868
10년 전 조회 458
10년 전 조회 556
10년 전 조회 716
10년 전 조회 627
10년 전 조회 1,341
10년 전 조회 1,150
10년 전 조회 615
10년 전 조회 536
10년 전 조회 868
10년 전 조회 598
10년 전 조회 496
10년 전 조회 554
10년 전 조회 490
10년 전 조회 533
10년 전 조회 477
10년 전 조회 710
10년 전 조회 2,557
10년 전 조회 695
10년 전 조회 422
10년 전 조회 473
10년 전 조회 508
10년 전 조회 1,813
10년 전 조회 1,740
10년 전 조회 1,121
10년 전 조회 1,419
10년 전 조회 1,555
10년 전 조회 1,505
10년 전 조회 892
🐛 버그신고