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

Javascript ¶ÔÏóµÄ±È½Ï

Õâ¸öËæ±ÊÆäʵÊÇΪÁ˸ÐлÇå·çЦ¸øµÄÒ»¸öÌáʾ£¬²»½ö½öÊǸæËßÎÒÔõôÅжÏÊý×飬¸üÈÃÎÒÓÐÁËÈÏÕæ¶ÁÒ»¶Á ¡¶javascriptȨÍþÖ¸ÄÏ¡·µÄÏë·¨¡£
±È½ÏºÍ¿½±´ÆäʵÊÇÒ»»ØÊ£¬´úÂëÈçÏ£º
//
//Compare object function
//
function Compare(fobj,sobj)
{
    var ftype = typeof(fobj);
    var stype = typeof(sobj);
    
    if (ftype == stype)
    {
        if (ftype == "object") 
        {
            if (fobj.constructor == Array && sobj.constructor == Array)//array
            {
                return CompareArray(fobj,sobj)
            }
            else if (fobj.constructor != Array && sobj.constructor != Array)//object
            {
                return CompareObject(fobj,sobj);
            }
            return false;
        }
        
        return fobj == sobj;
    }
    
    return false;
}
function CompareObject(fobj,sobj)
{


Ïà¹ØÎĵµ£º

JavaScript Cookie µÄÕýÈ·Ó÷¨

function getCookies(name)
{
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null) return unescape(arr[2]); return '';
}
function setCookie(name, value, expires,
function getCookies(name)
{
var a ......

ÉîÈëÀí½âJavaScript±Õ°ü£¨closure£©

×î½üÔÚÍøÉϲéÔÄÁ˲»ÉÙJavascript±Õ°ü(closure)Ïà¹ØµÄ×ÊÁÏ£¬Ð´µÄ´ó¶àÊǷdz£µÄѧÊõºÍרҵ¡£¶ÔÓÚ³õѧÕßÀ´Ëµ±ð˵Àí½â±Õ°üÁË£¬¾ÍÁ¬ÎÄ×ÖÐðÊö¶¼ºÜÄÑ¿´¶®¡£×«Ð´´ËÎĵÄÄ¿µÄ¾ÍÊÇÓÃ×îͨË×µÄÎÄ×Ö½Ò¿ªJavascript±Õ°üµÄÕæʵÃæÄ¿¡£
Ò»¡¢Ê²Ã´ÊDZհü£¿
“¹Ù·½”µÄ½âÊÍÊÇ£ºËùν“±Õ°ü”£¬Ö¸µÄÊÇÒ»¸öÓµÓÐÐí¶à±äÁ¿ºÍ°ó¶¨Á ......

JavaScript ÅжÏÉÏ´«ÎļþÀàÐÍ

function
 Check_FileType(str)
{
 
var
 pos 
=
 str.lastIndexOf(
"
.
"
);
 
var
 lastname 
=
 str.substring(pos,str.length)  //´Ë´¦Îļþºó׺ÃûÒ²¿ÉÓÃÊý×鷽ʽ»ñµÃstr.split(".")
 
if
 (lastname.toLowe ......

javascriptÑéÖ¤ÓÊÏä¸ñʽ´úÂë


ÓÃÒ»¸öÕý²à±í´ïʽÔÚjavascriptÖÐÑéÖ¤¾ÍÊÇ¿©!
<script language='javascript'>
function chkMail(){
if(document.form1.email.value=''){
alert("ÇëÌîдÓÊÏäµØÖ·!");
document.form1.email.focus();
return false;
}
//¿ªÊ¼ÑéÖ¤
var email = document.form1.email.value;
var pattern = /^([a-zA-Z0-9_-]) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ