Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javascript ÑéÖ¤´úÂëÕûÀí

//the common event,If your brower is firefox,you should use this function instead of "window.event"
function getEvent() {
if(document.all)
return window.event; //get ie event
func=getEvent.caller;
while(func!=null) {
var arg0=func.arguments[0];//alert(arg0);
if(arg0) {
if((arg0.constructor==Event || arg0.constructor ==MouseEvent) || (typeof(arg0)=="object" && arg0.preventDefault && arg0.stopPropagation)) {
return arg0;
}
}
func=func.caller;
}
return null;
}
//È¥³ý×ó²à¿Õ¸ñ
function LTrim(str)
{
return str.replace(/^\s*/g,"");
}

//È¥ÓÒ¿Õ¸ñ
function RTrim(str)
{
return str.replace(/\s*$/g,"");
}

//È¥µô×Ö·û´®Á½¶ËµÄ¿Õ¸ñ
function trim(str)
{
return str.replace(/(^\s*)|(\s*$)/g, "");
}

//È¥³ý×Ö·û´®Öмä¿Õ¸ñ
function CTim(str)
{
return str.replace(/\s/g,'');
}

//ÊÇ·ñΪÓÉÊý×Ö×é³ÉµÄ×Ö·û´®
function is_digitals(str)
{
var reg=/^[0-9]*$/;//Æ¥ÅäÕûÊý
return reg.test(str);
}

//ÑéÖ¤ÊÇ·ñΪÕûÊý£¬°üÀ¨Õý¸ºÊý£»
function Is_Int(str)
{
var reg=/^(-|\+)?\d+$/;
return reg.test(str);
}

//ÊÇ´óÓÚ0µÄÕûÊý
function Is_positive_num(str)
{
var reg=/^\d+$/;
return reg.test(str);
}

//¸ºÕûÊýµÄÑéÖ¤
function Is_minus(str)
{
var reg=/^-\d+$/;
return reg.test(str);
}

//ÑéÖ


Ïà¹ØÎĵµ£º

JavaScriptµÄÓ¦ÓÃ×ܽá(1)

      ÒÔÇ°ÒòΪ½Ó´¥µÄÏîÄ¿£¬Óõ½javascriptµÄµØ·½£¬±¾È˶ÔjavascriptÕâ¸ö¶«Î÷ÈÏʶ²»¹»£¬ÉõÖÁÒÔΪÊÇǰ̨³ÌÐòÔ±µÄ¹¤×÷¡£×î½ü×öµÄÏîÄ¿ÀïÃæÓõ½Á˺ܶàÕâÖֽű¾ÓïÑÔ£¬²Å·¢ÏÖÕâ¸öС¶«¶«ÊµÔÚÊǺܿɰ®£¬ËäÈ»ºÜÌÔÆø£¨²»ÊǺÜÃæÏò¶ÔÏñ£¬²»ÊǺܺõ÷ÊÔ£©£¬µ«ÊÇÖ»ÒªÊÇ×öweb¿ª·¢µÄ£¬¶¼ÄÑÃâÒª½Ó´¥µ½Ëû£¬°ÑÕ⸠......

Javascript ÖÐ ShowModalDialog µÄʹÓ÷½·¨

ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º
´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄܲÙ×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL
±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´Ö¸¶¨¶Ô»°¿òÒªÏ ......

JavaScriptʼþ´óÈ«3

//ÎÞģʽµÄÌáʾ¿ò
//ÆÁ±Î°´¼ü
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
   <noscript><meta http-equiv="refresh" content="0;url=about:noscript"></noscript>
   <title>ÆÁ±ÎÊó±êÓ ......

javascriptÊó±êË«»÷ʱ´¥·¢Ê¼þ´óÈ«4

javascriptʼþÁбí½â˵
ʼþ ä¯ÀÀÆ÷Ö§³Ö ½â˵
Ò»°ãʼþ onclick IE3¡¢N2 Êó±êµã»÷ʱ´¥·¢´Ëʼþ
ondblclick IE4¡¢N4 Êó±êË«»÷ʱ´¥·¢´Ëʼþ
onmousedown IE4¡¢N4 °´ÏÂÊó±êʱ´¥·¢´Ëʼþ
onmouseup IE4¡¢N4 Êó±ê°´ÏºóËÉ¿ªÊó±êʱ´¥·¢´Ëʼþ
onmouseover IE3¡¢N2 µ±Êó±êÒƶ¯µ½Ä³¶ÔÏó·¶Î§µÄÉÏ·½Ê±´¥·¢´Ëʼþ
onmou ......

JavaScript¾²Ì¬Ò³ÃæÖµ´«µÝÖ®Cookie

¡¡¡¡ÀûÓÃCookie£ºCookieÊÇä¯ÀÀÆ÷´æ´¢ÉÙÁ¿ÃüÃûÊý¾Ý.ËüÓëij¸öÌض¨µÄÍøÒ³»òÍøÕ¾¹ØÁªÔÚÒ»Æð¡£
¡¡¡¡CookieÓÃÀ´¸øä¯ÀÀÆ÷ÌṩÄÚ´æ,ÒÔ±ã½Å±¾ºÍ·þÎñÆ÷³ÌÐò¿ÉÒÔÔÚÒ»¸öÒ³ÃæÖÐʹÓÃÁíÒ»¸öÒ³ÃæµÄÊäÈëÊý¾Ý¡£
¡¡¡¡Post.htm
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
<input type="text" name="txt1">
<input type="button" value="Post">
<s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ