로컬에서 자바스크립트 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,372
10년 전 조회 1,268
10년 전 조회 809
10년 전 조회 1,406
10년 전 조회 460
10년 전 조회 906
10년 전 조회 1,104
10년 전 조회 556
10년 전 조회 511
10년 전 조회 507
10년 전 조회 359
10년 전 조회 522
10년 전 조회 529
10년 전 조회 1,060
10년 전 조회 466
10년 전 조회 540
10년 전 조회 516
10년 전 조회 1,444
10년 전 조회 553
10년 전 조회 412
10년 전 조회 549
10년 전 조회 574
10년 전 조회 644
10년 전 조회 444
10년 전 조회 497
10년 전 조회 900
10년 전 조회 834
10년 전 조회 815
10년 전 조회 366
10년 전 조회 452
10년 전 조회 451
10년 전 조회 392
10년 전 조회 654
10년 전 조회 380
10년 전 조회 722
10년 전 조회 381
10년 전 조회 680
10년 전 조회 374
10년 전 조회 598
10년 전 조회 1,174
10년 전 조회 489
10년 전 조회 515
10년 전 조회 372
10년 전 조회 1,441
10년 전 조회 1,079
10년 전 조회 674
10년 전 조회 632
10년 전 조회 441
10년 전 조회 563
10년 전 조회 1,227
10년 전 조회 1,260
10년 전 조회 1,934
10년 전 조회 1,009
10년 전 조회 888
10년 전 조회 1,390
10년 전 조회 508
10년 전 조회 483
10년 전 조회 484
10년 전 조회 465
10년 전 조회 554
10년 전 조회 675
10년 전 조회 910
10년 전 조회 442
10년 전 조회 972
10년 전 조회 838
10년 전 조회 642
10년 전 조회 510
10년 전 조회 482
10년 전 조회 544
10년 전 조회 491
10년 전 조회 513
10년 전 조회 842
10년 전 조회 436
10년 전 조회 536
10년 전 조회 699
10년 전 조회 604
10년 전 조회 1,323
10년 전 조회 1,133
10년 전 조회 593
10년 전 조회 511
10년 전 조회 847
10년 전 조회 571
10년 전 조회 471
10년 전 조회 532
10년 전 조회 467
10년 전 조회 515
10년 전 조회 453
10년 전 조회 686
10년 전 조회 2,534
10년 전 조회 669
10년 전 조회 400
10년 전 조회 447
10년 전 조회 483
10년 전 조회 1,789
10년 전 조회 1,718
10년 전 조회 1,100
10년 전 조회 1,395
10년 전 조회 1,525
10년 전 조회 1,484
10년 전 조회 862
🐛 버그신고