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);
}
//ÑéÖ
Ïà¹ØÎĵµ£º
×î½ü×öÒ»¸ö¹«Ë¾µÄÒµÎñϵͳ£¬¹«Ë¾ÒªÇóÄܾ¡¿ÉÄܵÄÓëc/s½üËÆ£¬Ò²¾ÍÊÇÈçc/sÒ»Ñù£¬µã»÷Îı¾¿ò¿ÉÒÔµ¯³ö´ËÏîÄ¿µÄÏà¹ØÄÚÈÝ£¬½øÐÐÑ¡ÔñÊäÈë¡£
ÎÒʹÓÃÁ˵¯³ö´°¿Ú£¬È»ºóÔÚ×Ó´°¿ÚË«»÷Ñ¡ÖÐÏîÄ¿£¬°ÑÑ¡ÖеÄÖµ·µ»Ø¸ø¸¸´°Ìå¡£
ÔÚϵͳ×öÍêÁËÖ®ºó£¬ÔÚ¿Í»§Ê¹ÓõĹý³Ì£¬ÓÉÓÚ¿Í»§Ê¹ÓõÄÊÇ512m ......
¾¡¹Ü JavaScript ÀúÊ·ÉÏʹÓÃÈß³¤¶øÁîÈËÉúÑáµÄ´úÂë¿éÀ´±êµÄÌض¨ä¯ÀÀÆ÷µÄʱÆÚÒѾ½áÊøÁË£¬µ«ÊÇż¶ûʹÓÃһЩ¼òµ¥µÄ´úÂë¿éºÍ¶ÔÏó¼ì²âÀ´È·±£Ò»Ð©´úÂëÔÚÓû§»úÆ÷ÉÏÕý³£¹¤×÷ÒÀÈ»ÊDZØÒªµÄ¡£
ÕâƪÎÄÕÂÖУ¬ÎÒ»áÂÔÊöһϠInternet Explorer ºÍ Firefox ÔÚ JavaScript Óï·¨Éϲ»Í¬µÄ 7 ¸ö·½Ãæ¡£
1. CSS “float” ÊôÐÔ
Ȗ ......
ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º
´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄܲÙ×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL
±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´Ö¸¶¨¶Ô»°¿òÒªÏ ......
javascriptÌṩÁËÐí¶àº¯Êý¹©¿ª·¢ÈËԱʹÓã¬ÏÂÃæ¸ø³öÒ»¸ö¼òµ¥½éÉÜ£¬¸üÏêϸµÄÐÅÏ¢Çë²Î¿¼Visual InterDevÌṩµÄÔÚÏß°ïÖú¡£
¡¡¡¡javascriptº¯ÊýÒ»¹²¿É·ÖΪÎåÀࣺ
¡¡¡¡·³£¹æº¯Êý
¡¡¡¡·Êý×麯Êý
¡¡¡¡·ÈÕÆÚº¯Êý
¡¡¡¡·Êýѧº¯Êý
¡¡¡¡·×Ö·û´®º¯Êý
¡¡¡¡1.³£¹æº¯Êý
¡¡¡¡javascript³ ......
JS Check£º
javascriptlint http://www.javascriptlint.com/index.htm
jslint http://www.jslint.com/
JS UT£º
http://www.jsunit.net/
JS ST£º
http://www.outofhanwell.com/ieleak/index.php?title=Main_Page Drip
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
http://blogs.msdn. ......