반응형
반응형

'WEB > HTML&SCRIPTS' 카테고리의 다른 글

VBS로 UnixTime >> DateTime  (0) 2010.10.21
JavaScript 정규식을 이용한 trim  (0) 2010.10.21
iframe 내부를 투명하게  (0) 2010.10.21
JavaScript 문서 로딩시간 보여주기  (0) 2010.10.21
HTML 소스보기 막기  (0) 2010.10.21
반응형

1.<iframe>소스 안에 다음을 추가

<iframe allowTransparency="true"></iframe>

2. iframe에 불려질 문서의 body 안에 배경 투명하게 해주는 태그삽입

<body style="background-color:transparent">


익스 5.5 이상에서만 됨
반응형
반응형

페이지 로딩하는데 2.75 초 걸렸슴다.
플래쉬에서만 이런효과 보셨죠..이젠 쉽게 홈페이지에 쓰세요.
아참 익스에서만 됩니다..
-----------------------------------------------------
[ 페이지 로딩 시간 보여주기 ]

<html>
<head><title></title>
</head>

<body id=body bgcolor=black link=blue vlink=blue alink=blue>
<div id=ld style=color:white>
<br><br><br><center>
<h1>접속중...</h1>
<table width=50%><tr><td align=left>
<table id=lpc bgcolor=blue><tr><td> </td></tr></table>
</td></tr></table>
</center>
</div>

<div style=display:none id=page>
<h1>여기는 자바월드</h1>
<hr><br>
<b><big>페이지 로딩하는데 <q id=q></q> 초 걸렸슴다.</big></b>
<br><br><br>
<font size="2">플래쉬에서만 이런효과 보셨죠..이젠 쉽게 홈페이지에 쓰세요.<br>
아참 익스에서만 됩니다용~</font>
</div>

<script language=JavaScript>
<!--
ini = new Date().getTime();
var pc = 0;
load();

function LOAD ()
{
pc += 4;

lpc.style.width = pc + "%";
time = setTimeout("load()",100);
if (pc > 100) { clearTimeout(time); loaded() }
}

function loaded()
{
fim = new Date().getTime();
dif = fim - ini;
ld.style.display = 'none';
body.style.backgroundColor = 'silver';
q.innerHTML = dif/1000;
page.style.display = '';
}

function SHOW ()
{
if (txt.style.display == "none") { txt.style.display = "" }
else { txt.style.display = "none" }
}
//-->
</script>
</body>
</html>
반응형
반응형


body 에 ondragstart="return false" onselectstart="return false"를 삽입
반응형
반응형

<html>
<head><title>주민등록번호 검사</title>
<script language="javascript">
function chkresno(resno) {

  // 주민번호의 형태와 7번째 자리(성별) 유효성 검사
  fmt = /^\d{6}-[1234]\d{6}$/;
  if (!fmt.test(resno)) {
    alert("잘못된 주민등록번호입니다."); return;
  }

  // 날짜 유효성 검사
  birthYear = (resno.charAt(7) <= "2") ? "19" : "20";
  birthYear += resno.substr(0, 2);
  birthMonth = resno.substr(2, 2) - 1;
  birthDate = resno.substr(4, 2);
  birth = new Date(birthYear, birthMonth, birthDate);

  if ( birth.getYear() % 100 != resno.substr(0, 2) ||
       birth.getMonth() != birthMonth ||
       birth.getDate() != birthDate) {
    alert("잘못된 주민등록번호입니다."); return;
  }

  // Check Sum 코드의 유효성 검사
  buf = new Array(13);
  for (i = 0; i < 6; i++) buf[i] = parseInt(resno.charAt(i));
  for (i = 6; i < 13; i++) buf[i] = parseInt(resno.charAt(i + 1));

  multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
  for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]);

  if ((11 - (sum % 11)) % 10 != buf[12]) {
    alert("잘못된 주민등록번호입니다."); return;
  }

  alert("정상적인 주민등록번호입니다.");
}
</script>
</head>
<body>
<h1>주민등록번호 검사</h1>
<form onSubmit="chkresno(this.resno.value);">
주민등록번호 <input type="text" name="resno">
<input type="submit" value="지금 검사">
</form>
</body>
반응형
반응형

2진수 데이터를 10진수로 바꾸는 방법

' 2진수를 10진수로 바꾸기
str = StrReverse(sb_RS("downno"))
c = 0
for idx = 1 to len(str)
b = int(mid(str,idx,1))
c = c + (b* 2^(idx-1))
next
' 16진수 로 만들기..
d = HEX(c)
반응형
반응형
반응형
반응형
반응형
반응형

CKEDITOR 이미지 섹션에 이미지 업로드된 서버보기가 존재하는데
그 것을 없애게 (여러명이 공유해서 사용하는 경우)하는 방법

1. 시술전

2. 시술과정
 ~/ckeditor/plugins/image/dialogs/image.js 로 이동하여 다음글귀를 변경

--------------------------------------------------------------------------------     type:'button',id:'browse',style:'display:inline-block;margin-top:10px;'    
-> type:'button',id:'browse',style:'display:none;/*inline-block;*/margin-top:10px;'
--------------------------------------------------------------------------------

 

3. 시술후

짜잔~


반응형

+ Recent posts