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

³£ÓÃÕýÔò±í´ïʽ,³£ÓÃ±íµ¥ÑéÖ¤javascript´úÂë

function f_MobilCheck(as_SourceString)
{
 if(as_SourceString.match(/^13[0-9]{9}$/g)) return true;  //ÊÖ»úºÅΪ13¿ªÍ·µÄ11λÊý×Ö
 else if(as_SourceString.match(/^[0]{1}[0-9]{2,3}[2-8]{1}[0-9]{5,7}$/g)) return true;¡¡¡¡//СÁéͨΪ0¿ªÍ·µÄ3-4λµÄÇøºÅ£«²»ÒÔ1ºÍ9¿ªÍ·µÄ6£­8λÊý×Ö
 return false;
}
 
//--------ÇëÐÂÔöº¯Êýʱ¼Ó×¢ÊÍ£¬¾¡Á¿½«Í¬ÀàµÄº¯Êý·ÅÔÚÒ»Æ𣬱ãÓÚ²éÕÒ¡£------Label_NameÔÊÐíΪ¿Õ£¬ÔÚÌáʾÓëÊäÈë¿ò·ÖÀëʱʹÓá£--------
 
//-------------------------------------------ɾ³ý×Ö·û´®×ó¿Õ¸ñ£¨°üÀ¨È«½Ç¿Õ¸ñ£©----------------
function f_PubStrLTrim(as_SourceString)
{
 return as_SourceString.replace(/^[\s¡¡]*/,"");
}
//-------------------------------------------ɾ³ý×Ö·û´®ÓÒ¿Õ¸ñ£¨°üÀ¨È«½Ç¿Õ¸ñ£©-----------------
function f_PubStrRTrim(as_SourceString)
{
 return as_SourceString.replace(/[\s¡¡]*$/,"");
}
//-------------------------------------------ɾ³ý×Ö·û´®×óÓÒ¿Õ¸ñ£¨°üÀ¨È«½Ç¿Õ¸ñ£©----------------
function f_PubStrTrim(as_SourceString)
{
 return f_PubStrRTrim( f_PubStrLTrim(as_SourceString)); 
}
//-------------------------------------------ɾ³ý×Ö·û´®µÄÈ«²¿¿Õ¸ñ£¨°üÀ¨È«½Ç¿Õ¸ñ£©-----------------
function f_PubStrTrimAll(as_SourceString)
{
 return as_SourceString.replace(/[\s¡¡]*/g,"");
 
}
//---------------------------------------------ÑéÖ¤ÊÇ·ñºÏ·¨µÄµç×ÓÓÊÏäµØÖ·----ºÏ·¨£ºtrue---²»ºÏ·¨£ºfalse---------
function f_EmailCheck(as_SourceString)
{
 return as_SourceString.match(/^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/g);
}
//----------------------------------------------ÑéÖ¤ÊÇ·ñ²»º¬ÓзǷ¨µÄ×Ö·û--²»º¬ÓУ¬¼´ºÏ·¨£ºtrue---²»ºÏ·¨£ºfalse-------------
function f_StringCheck(as_SourceString)
{
 //·Ç·¨×Ö·û--£¨Ë«¼õºÅ£©/*£¨Ð±¸ÜÐǺţ©'£¨µ¥ÒýºÅ£©;£¨·ÖºÅ£©"£¨Ë«ÒýºÅ£©%£¨°Ù·ÖºÅ£©<£¨×ó¼âÀ¨ºÅ£©>£¨ÓÒ¼âÀ¨ºÅ£©
 if(as_SourceString.match(/\/\*|-{2}|[';"%<>]+/)) return false;
 else return true;
}
//------------------------------


Ïà¹ØÎĵµ£º

Javascript DOMѧϰ±Ê¼Ç3


Ô¤¶¨Ê±¼äÖ®ºóÖ´Ðк¯Êý
setTimeout("functionname",interval)
ÌáÈ¡×Ö·û´®ÖÐÊýÖµÐÅÏ¢
parseInt(string)
¸´Öƽڵã(ÊÇ·ñ¸´ÖÆ×Ó½Úµã)
cloneNode(true/false)
ɾ³ý×Ó½Úµã
 removeChild()
Ìæ»»½Úµã
 replaceChild(newChild,oldChild)
×Ó½ÚµãÅжÏ
 hasChildNodes ......

Ò»¸öͨÓõÄJavaScript·ÖÒ³


Ò»¸öͨÓõÄJavaScript·ÖÒ³
1.JavaScript´úÂë
Pagination=function(id)
{
var totalNum=0;
var maxNum=10;
var pageUrl="";
var breakpage = 5;
var currentposition = 0;
var breakspace = 2;
var maxspace = 4;
var currentpage=1;
var perpage=10;
var id =id;
this.initPage = function( ......

Ïêϸ½â¶ÁJavaScriptµÄthis¹Ø¼ü×Ö


ÓÃÁ˺ܾÃJavaScript£¬¶Ô¡¾this¡¿µÄÈÏʶֻ¾ÖÏÞÓÚÒÔÍùµÄƾ¾­Ñé¶øÒÑ£¬²»¹ý½ñÌì·¢ÏÖÁ˺ö«Î÷“http://www.quirksmode.org/js/associative.html”£¬ÏêϸÃèÊöÁËÈçºÎʹÓá¾this¡¿¹Ø¼ü×Ö£¬ÔÚÕâÀïÎҾͼò¶ÌµÄ˵һÏÂÖص㣬Èç¹ûÓÐÒÉÎÊ¿ÉÒÔÖ±½Ó²Î¿¼Ô­ÎÄ¡£
ÔÚѧϰ¹ýÓÐthisµÄ±à³ÌÓïÑÔÖУ¬thisÒ»°ã¶¼ÊÇÖ¸Ïòµ±Ç°ÊµÀý¶ÔÏóµÄ£¬¶ÔÓ ......

Javascript ×Ö·û´® substring Óë substr Çø±ð

stringObject.substring(start,end);
º¯Êý·½·¨½«·µ»ØÒ»¸ö°üº¬´Ó start µ½×îºó£¨²»°üº¬ end £©µÄ×Ó×Ö·û´®µÄ×Ö·û´®.
start     ±ØÐè¡£Ò»¸ö·Ç¸ºµÄÕûÊý£¬¹æ¶¨ÒªÌáÈ¡µÄ×Ó´®µÄµÚÒ»¸ö×Ö·ûÔÚ stringObject ÖеÄλÖÃ.
stop     ¿ÉÑ¡¡£Ò»¸ö·Ç¸ºµÄÕûÊý£¬±ÈÒªÌáÈ¡µÄ×Ó´®µÄ×îºóÒ»¸ö×Ö·ûÔÚ stringObject ......

½â¾öie6ÏÂJavascriptÒ³ÃæÌøתºÍ±íµ¥Ìá½»ÎÊÌâ

¾­³£ÔÚie6ϳöÏÖjavascriptÒ³ÃæÌøתºÍ±íµ¥Ìá½»ÎÊÌ⣬ie6ÏÂʵÏÖjavascriptÒ³ÃæÌøתºÍ±íµ¥Ìá½»ÐèÒª½øÐÐÌرð´¦Àí£¬ÐèҪʹÓÃsetTimeout()º¯ÊýÑÓ³ÙʵÏÖ¡£
1£¬¼æÈݸ÷ä¯ÀÀÆ÷µÄJavascriptÒ³ÃæÌøת
setTimeout(function(){
window.location.href = url;
},0);
2£¬¼æÈݸ÷ä¯ÀÀÆ÷µÄJavascript±íµ¥Ìá½»
setTimeout(function ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ