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

Javascriptº¯Êý´óÈ« £¨¸öÈ˺¯ÊýÊÕ¼¯£©


/*
 -------------- º¯Êý¼ìË÷ --------------
 trimº¯Êý:                         trim() lTrim() rTrim()
 Ð£Ñé×Ö·û´®ÊÇ·ñΪ¿Õ:                 checkIsNotEmpty(str)
 Ð£Ñé×Ö·û´®ÊÇ·ñΪÕûÐÍ:               checkIsInteger(str)
 Ð£ÑéÕûÐÍ×îСֵ:                    checkIntegerMinValue(str,val)
 Ð£ÑéÕûÐÍ×î´óÖµ:                    checkIntegerMaxValue(str,val) 
 Ð£ÑéÕûÐÍÊÇ·ñΪ·Ç¸ºÊý:               isNotNegativeInteger(str)
 Ð£Ñé×Ö·û´®ÊÇ·ñΪ¸¡µãÐÍ:             checkIsDouble(str) 
 Ð£Ñ鸡µãÐÍ×îСֵ:                  checkDoubleMinValue(str,val)
 Ð£Ñ鸡µãÐÍ×î´óÖµ:                  checkDoubleMaxValue(str,val)
 Ð£Ñ鸡µãÐÍÊÇ·ñΪ·Ç¸ºÊý:             isNotNegativeDouble(str)
 Ð£Ñé×Ö·û´®ÊÇ·ñΪÈÕÆÚÐÍ:             checkIsValidDate(str)
 Ð£ÑéÁ½¸öÈÕÆÚµÄÏȺó:                checkDateEarlier(strStart,strEnd)
 Ð£Ñé×Ö·û´®ÊÇ·ñΪemailÐÍ:         


Ïà¹ØÎĵµ£º

JavascriptºÍAjaxÖÐÎÄÂÒÂëÍÂѪ°æ½â¾ö·½°¸

Òý×Ô£ºhttp://www.cnblogs.com/dongritengfei/archive/2009/12/21/1628489.html
 
½ñÌìŪÁËÒ»ÌìµÄAjaxÖÐÎÄÂÒÂëÎÊÌ⣬AjaxµÄÂÒÂëÎÊÌâ·ÖΪÁ½ÖÖ£º
1. JavaScriptÊä³öµÄÖÐÎÄÂÒÂ룬
±ÈÈ磺alert("ÖÐÎÄÂÒÂë²âÊÔ");
½â¾öµÄ°ì·¨±È½Ï¼òµ¥£¬¾ÍÊǰÑjspÀïËùÓеÄcharsetºÍpageEncodingµÄÖµ¶¼ÉèÖóÉÏàͬµÄ£¬Ò»°ãÊÇutf-8.
  ......

FlexÓëJavascript»¥ÏàͨÐÅ

FlexÓëJavascript»¥ÏàͨÐÅ¡£
ÔÚFlexÖÐÓÐÕâôһ¸öÀࣺExternalInterface.ÔÚÕâ¸öÀàÖÐËü¸øÎÒÃÇ£ºcallºÍaddCallback
FlexÖÐAsµ÷ÓÃJsµÄ·½·¨ÊÇ£º
     1¡¢µ¼Èë°ü £¨import flash.external.ExternalInterface;£©
     2¡¢Ê¹ÓÃExternalInterface.call("Jsº¯ÊýÃû³Æ",²ÎÊý)½øÐе÷Óã¬Æä· ......

JavaScript ÉèΪÖ÷Ò³Óë¼ÓÈëÊÕ²Ø

//ÉèÖõ±Ç°Ò³ÃæÎªÓû§µÄÊ×Ò³
function setHomepage()
{
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage(window.location.href);
   event.returnValue=false;
   return;
}
//¼ÓÈëÊÕ²Ø
function addFavorite()
{
 &nb ......

JavascriptÖг£Óõľ­µä¼¼ÇÉ

JavascriptÖг£Óõľ­µä¼¼ÇÉ
 
1. oncontextmenu="window.event.returnValue=false"
½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table>
¿ÉÓÃÓÚTable
2. <body onselectstart="return false">
È¡Ïûѡȡ¡¢·ÀÖ¹¸´ÖÆ
3. onpaste=&quo ......

Ê·ÉÏ×îÅ£X×î¼ò½àµÄJavascriptͼƬËõ·Å´úÂë

Ô´Â룺
function resize(img, width, height) {
 (img.width > img.height)
 ? ((img.height = Math.min(height, width * img.height/img.width)) || (img.width = Math.min(width, img.width)))
 : ((img.width = Math.min(width, height * img.width/img.height)) || (img.height = Math.min(hei ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ