javascriptÑéÖ¤1
function $id(s) {
return document.getElementById(s);
}
//ÅжÏСÊý
function IsFloat(s) {
if (!/^[+\-]?\d+(.\d+)?$/.test(s))
return false;
else
return true;
}
//ÅжÏÕýСÊý
function IsPlusFloat(s) {
if (!/^[+]?\d+(.\d+)?$/.test(s))
return false;
else
return true;
}
//ÅжÏÕýÕûÊý
function IsPlusInt(s) {
if (!/^\d*$/.test(s))
return false;
else
return true;
}
//ÅжÏÊÇ·ñΪ×ÖĸºÍÊý×Ö
function CheckName(s) {
if (!/^[A-Za-z0-9._-]+$/.test(s))
return false;
else
return true;
}
//¼ì²âEmail¸ñʽ
function IsEmail(s) {
var pattern = /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
flag = pattern.test(s);
if (!flag) {
return false;
}
return (true);
}
//±È½ÏÁ½¸öÊýÊÇ·ñÏàͬ
function CompValue(s1, s2) {
if (s1 != s2) {
return false;
}
else
return true;
}
//ÅжÏ×Ö·ûÊÇ·ñΪ¿Õ
function IsEmpty(s) {
if (s == "") {
return false;
}
else
return true;
}
//È¡RadioListµÄÖµ
function GetRadioList(s) {
var radListItems = document.all(s);
var radListItesCount = radListItems.le
Ïà¹ØÎĵµ£º
click() ¶ÔÏó.click() ʹ¶ÔÏó±»µã»÷¡£
closed ¶ÔÏó.closed ¶ÔÏó´°¿ÚÊÇ·ñÒѹرÕtrue/false
clearTimeout(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetTimeout¶ÔÏó
clearInterval(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetInterval¶ÔÏó
confirm("ÌáʾÐÅÏ¢") µ¯³öÈ·ÈÏ¿ò£¬È·¶¨·µ»ØtrueÈ¡Ïû·µ»Øfalse
cursor:Ñùʽ ¸ü¸ÄÊó±êÑùʽ hand crosshair text wait help defa ......
//ÎÞģʽµÄÌáʾ¿ò
//ÆÁ±Î°´¼ü
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<noscript><meta http-equiv="refresh" content="0;url=about:noscript"></noscript>
<title>ÆÁ±ÎÊó±êÓ ......
ʼþÔ´¶ÔÏó
event.srcElement.tagName
event.srcElement.type
²¶»ñÊÍ·Å
event.srcElement.setCapture();
event.srcElement.releaseCapture();
ʼþ°´¼ü
event.keyCode
event.shiftKey
event.altKey
event.ctrlKey
ʼþ·µ»ØÖµ
event.returnValue
Êó±êλÖÃ
event.x
event.y
´°Ìå»î¶¯ÔªËØ
d ......
1¡¡¾Ö²¿´òÓ¡·½·¨£º
×÷Ó㺽«idΪdayinµÄÄÚÈÝ£¬Ð½¨Ò³Ãæ²¢´òÓ¡£¬¿É½â¾ö´òӡijҳÃæÖеIJ¿·ÖÄÚÈݵÄÎÊÌâ¡£
ʹÓ÷½·¨£º½«Òª´òÓ¡µÄÄÚÈÝͨ¹ý <span id="dayin"></span>°üº¬ÆðÀ´£¬È»ºóÔÚij¸ö°´Å¤Öж¨Òå
ʼþ
<input type="button" onclick="dayin()" value="´òÓ¡">
function dayin()
{
......