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

javascript cookies²Ù×÷


javascript cookies²Ù×÷
<script>
//дcookiesº¯Êý ×÷ÕߣºµÔÕñ¿­
function SetCookie(name,value)//Á½¸ö²ÎÊý£¬Ò»¸öÊÇcookieµÄÃû×Ó£¬Ò»¸öÊÇÖµ
{
    var Days = 30; //´Ë cookie ½«±»±£´æ 30 Ìì
    var exp  = new Date();    //new Date("December 31, 9998");
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
    document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
}
function getCookie(name)//È¡cookiesº¯Êý        
{
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
     if(arr != null) return unescape(arr[2]); return null;
}
function delCookie(name)//ɾ³ýcookie
{
    var exp = new Date();
    exp.setTime(exp.getTime() - 1);
    var cval=getCookie(name);
    if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
}
SetCookie ("xiaoqi", "3")
alert(getCookie('xiaoqi'));
</script>
Ò»¸ö·Ç³£ÊµÓõÄjavascript¶ÁдCookieº¯Êý
Ò»¸ö·Ç³£ÊµÓõÄjavascript¶ÁдCookieº¯Êý  
function  GetCookieVal(offset)
//»ñµÃCookie½âÂëºóµÄÖµ
{
var  endstr  =  documents.cookie.indexOf  (";",  offset);
if  (endstr  ==  -1)
endstr  =  documents.cookie.length;
return  unescape(documents.cookie.substring(offset,  endstr));
}
function  SetCookie(name,  value)
//É趨CookieÖµ
{
var  expdate  =  new  Date();
var  argv  =  SetCookie.arguments;
var  argc  =  SetCookie.arguments.length;
var  expires  =  (argc  >  2)  ?  argv[2]  :  null;
var  path  =  (argc&nbs


Ïà¹ØÎĵµ£º

javascriptµÄwindows.open²ÎÊýѧϰ


<SCRIPT LANGUAGE="javascript">
<!--
window.open ('page.html', 'newwindow', 'height=100, width=400, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')
file://д/³ÉÒ»ÐÐ
-->
</SCRIPT>
²ÎÊý½âÊÍ£º
<SCRIPT LANGUAGE="javascript"&g ......

(תÔØ)javascript²Ù×÷Select±ê¼ÇÖÐoptions¼¯ºÏ


 
[ 2007-8-6 17:03:00 | By: ibrahim ]
 
javascript²Ù×÷Select±ê¼ÇÖÐoptions¼¯ºÏ

ÏÈÀ´¿´¿´options¼¯ºÏµÄÕ⼸¸ö·½·¨£º
options.add(option)·½·¨Ïò¼¯ºÏÀïÌí¼ÓÒ»Ïîoption¶ÔÏó£»
options.remove(index)·½·¨ÒƳýoptions¼¯ºÏÖеÄÖ¸¶¨Ï
options(index)»òoptions.item(index)¿ÉÒÔͨ¹ýË÷Òý»ñÈ¡options¼¯º ......

javascriptѧϰ·½·¨

 1.²»¹ýÎÒ½ÌÄãÒ»¸öѧ×öÍøÒ³µÄ¼¼ÇÉ
ÿ¿´µ½Ò»¸öƯÁÁµÄÍøÒ³¾Í²é¿´Ï´úÂë
2.¿´ÕÅТÏéµÄÊÓƵ
3¡£´Ó»ù´¡Ñ§Æð¡£È»ºóѧЩ»ù±¾µÄWEB¿ª·¢Ó¦ÓÃ
ÍƼöÒ»¸öÍøÕ¾http://www.ccscript.cn/
¸ÃÕ¾Ïêϸ·ÖÀàJSµÄ»ù´¡,¶ÔÏó,¼«ÆäÓ¦Óã»
¸ÃÕ¾ÓжàÖÖµ±½ñÁ÷ÐеÄJS¿ò¼Ü£»
Õ¾ÄÚÖ÷´òJquery¿ò¼ÜµÄ»ù´¡¼°Ó¦Óã»
°üÀ¨ÌØЧ´úÂëºÍչʾÌØЧ£» ......

Javascript±Õ°ü£¨Closure£©


±Õ°ü£¨closure£©ÊÇJavascriptÓïÑÔµÄÒ»¸öÄѵ㣬ҲÊÇËüµÄÌØÉ«£¬ºÜ¶à¸ß¼¶Ó¦Óö¼ÒªÒÀ¿¿±Õ°üʵÏÖ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄѧϰ±Ê¼Ç£¬¶ÔÓÚJavascript³õѧÕßÓ¦¸ÃÊǺÜÓÐÓõġ£
Ò»¡¢±äÁ¿µÄ×÷ÓÃÓò
ÒªÀí½â±Õ°ü£¬Ê×ÏȱØÐëÀí½âJavascriptÌØÊâµÄ±äÁ¿×÷ÓÃÓò¡£
±äÁ¿µÄ×÷ÓÃÓòÎ޷ǾÍÊÇÁ½ÖÖ£ºÈ«¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿¡£
JavascriptÓïÑÔµÄÌØÊâÖ®´¦£¬¾ÍÔ ......

ÉîÈëÀí½âJavascript±Õ°ü

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