로컬에서 자바스크립트 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,293
10년 전 조회 1,186
10년 전 조회 724
10년 전 조회 1,334
10년 전 조회 381
10년 전 조회 818
10년 전 조회 1,028
10년 전 조회 485
10년 전 조회 434
10년 전 조회 433
10년 전 조회 287
10년 전 조회 434
10년 전 조회 457
10년 전 조회 982
10년 전 조회 386
10년 전 조회 462
10년 전 조회 437
10년 전 조회 1,362
10년 전 조회 466
10년 전 조회 327
10년 전 조회 479
10년 전 조회 497
10년 전 조회 570
10년 전 조회 374
10년 전 조회 430
10년 전 조회 829
10년 전 조회 761
10년 전 조회 737
10년 전 조회 292
10년 전 조회 378
10년 전 조회 379
10년 전 조회 319
10년 전 조회 588
10년 전 조회 312
10년 전 조회 649
10년 전 조회 310
10년 전 조회 607
10년 전 조회 308
10년 전 조회 534
10년 전 조회 1,106
10년 전 조회 429
10년 전 조회 447
10년 전 조회 311
10년 전 조회 1,381
10년 전 조회 1,012
10년 전 조회 612
10년 전 조회 565
10년 전 조회 382
10년 전 조회 498
10년 전 조회 1,157
10년 전 조회 1,195
10년 전 조회 1,864
10년 전 조회 948
10년 전 조회 823
10년 전 조회 1,326
10년 전 조회 447
10년 전 조회 419
10년 전 조회 416
10년 전 조회 400
10년 전 조회 487
10년 전 조회 612
10년 전 조회 845
10년 전 조회 381
10년 전 조회 906
10년 전 조회 777
10년 전 조회 582
10년 전 조회 451
10년 전 조회 421
10년 전 조회 480
10년 전 조회 433
10년 전 조회 453
10년 전 조회 784
10년 전 조회 379
10년 전 조회 468
10년 전 조회 632
10년 전 조회 552
10년 전 조회 1,263
10년 전 조회 1,076
10년 전 조회 541
10년 전 조회 452
10년 전 조회 785
10년 전 조회 511
10년 전 조회 421
10년 전 조회 481
10년 전 조회 417
10년 전 조회 460
10년 전 조회 402
10년 전 조회 645
10년 전 조회 2,491
10년 전 조회 620
10년 전 조회 350
10년 전 조회 401
10년 전 조회 435
10년 전 조회 1,734
10년 전 조회 1,662
10년 전 조회 1,052
10년 전 조회 1,341
10년 전 조회 1,474
10년 전 조회 1,431
10년 전 조회 819
🐛 버그신고