ÓÃJavascriptÀ´²Ù×÷Cookie
ÍøÕ¾¾³£Óõ½µÄÒ»¸ö¶«Î÷ÓÃÀ´ÔÝ´æһЩÏà¹ØÐÅÏ¢µÄCookieÓÐÓŵãÒ²ÓÐȱµã£¬ËüÄܹ»²»Õ¼Ó÷þÎñÆ÷×ÊÔ´£¬´æ´¢ÔÚ¿Í»§¶ËµÄµçÄÔÀ¿ÉÕâÑùÒ²ÓÐÒ»¶¨µÄΣÏÕÐÔ£¬ÒòΪÏà¹ØÐÅÏ¢±ÈÈç˵µÇ¼ij¸öÍøÕ¾µÄÓû§ÃûºÍÃÜÂëÖ®ÀàµÄÐÅÏ¢£¬¶¼»á´æÔÚ¿Í»§¶ËµÄµçÄÔÀÕâÑù»á±»Ä³Ð©“ÓÐÐÄÖ®ÈË”ÀûÓã¬ËùÒÔ£¬ÓÐЩÈËÏ°¹ßÔÚ¹«¹²³¡ºÏʹÓÃÍêµçÄÔºóÇåµôCookieÐÅÏ¢£¬µ±È»Ç°ÌáÊǴ˵çÄÔδ“ÑøÂ픣¬²»¹ý±¾ÎÄÌÖÂÛÎĵÄÎÊÌâ²»ÊÇCookieµÄ°²È«ÎÊÌ⣬¶øÊÇÒ»¸ö¼òµ¥µÄÀûÓÃjsÀ´²Ù×÷CookieµÄÀý×Ó£¬Ò»Æð¿´¿´°É¡£¡£¡£
<mce:script type="text/javascript"><!--
¡¡
function Set(Cookie_name)¡¡¡¡
{¡¡¡¡
¡¡var Then = new Date()¡¡¡¡
¡¡Then.setTime(Then.getTime() + 1*3600000 ) //Сʱ¡¡¡¡
¡¡document.cookie = Cookie_name+"=true;expires="+ Then.toGMTString()¡¡¡¡
}¡¡¡¡
function Get(Cookie_name)¡¡¡¡
{¡¡¡¡
¡¡var cookieString = new String(document.cookie)¡¡¡¡
¡¡var cookieHeader = Cookie_name+"="¡¡¡¡
¡¡var beginPosition = cookieString.indexOf(cookieHeader)¡¡¡¡
¡¡if (beginPosition != -1) //cookieÒѾÉèÖÃÖµ£¬Ó¦¸Ã ²»ÏÔʾÌáʾ¿ò¡¡¡¡
¡¡{¡¡¡¡
¡¡¡¡ alert(Cookie_name+"·µ»Ø"+cookieString.substring(beginPosition + cookieHeader.length));¡¡¡¡
¡¡}¡¡¡¡
¡¡else¡¡//cookieûÓÐÉèÖÃÖµ£¬Ó¦¸ÃÏÔʾÌáʾ¿ò¡¡¡¡
¡¡{¡¡¡¡
¡¡ alert("Cookie δÕÒµ½!");¡¡¡¡
¡¡}¡¡¡¡
}¡¡¡¡
function Move(Cookie_name)¡¡¡¡
{¡¡¡¡
¡¡document.cookie = Cookie_name+"=;expires=Fri, 02-Jan-1970 00:00:00 GMT";¡¡¡¡
}¡¡¡¡
// --></mce:script>¡¡
<P><INPUT onclick="Set('steven lu')" type=button value=ÉèÖÃcookieÖµ></P>¡¡
<P><INPUT onclick="Get('steven lu')" type=button value=²é¿´cookieÖµ></P>¡¡
<INPUT onclick="Move('steven lu')" type=button value=Çå³ýcookieÖµ>
Ïà¹ØÎĵµ£º
JavaScriptÓïÑÔÊÇ»ùÓÚ¶ÔÏóµÄ£¨Object-Based£©£¬¶ø²»ÊÇÃæÏò¶ÔÏóµÄ£¨object-
oriented£©¡£Ö®ËùÒÔ˵ËüÊÇÒ»ÃÅ»ùÓÚ¶ÔÏóµÄÓïÑÔ£¬Ö÷ÒªÊÇÒòΪËüûÓÐÌṩÏó³éÏ󡢼̳С¢ÖØÔصÈÓйØÃæÏò¶ÔÏóÓïÑÔµÄÐí¶à¹¦ÄÜ¡£¶øÊÇ°ÑÆäËüÓïÑÔËù´´½¨µÄ¸´
ÔÓ¶ÔÏóͳһÆðÀ´£¬´Ó¶øÐγÉÒ»¸ö·Ç³£Ç¿´óµÄ¶ÔÏóϵͳ¡£
¡¡¡¡¡¡¡¡ËäÈ»JavaScriptÓïÑÔÊÇÒ»ÃÅ»ùÓÚ¶ÔÏó ......
µÚÒ»Ìâ
(function(){
return typeof arguments;
})();
//ÎÊ×Ô¶¯Ö´Ðк¯Êý»á·µ»Øʲôֵ
// ¾ÍÊÇ¿¼Arguments¶ÔÏóµÄtypeof
// ¿´Æ½Ê±ÓÃfirebug¶à²»¶àÁË¡¡
µÚ¶þÌâ
var f = function g(){ return 23; };
typeof g();
//ÎÊ×îºóÒ»ÐеÄÖ´Ðнá¹û
//¸ù¾Ý±ê×¼£¬ÃüÃûº¯Êý±í´ïʽµÄº¯ÊýÃûÖ»¶Ôº¯Êý ......
JavaScript ¿ÉËãÊÇÊÀ½çÉÏ×îÁ÷Ðеıà³ÌÓïÑÔ£¬ËüÔø±» Web ¿ª·¢Éè¼ÆʦÌùÉÏجÃεıêÇ©£¬ËäÈ»ÕæÕýµÄجÃÎÆäʵÊÇ DOM
API£¬Õâ¸ö±»´óÁ¿µÄ¿ª·¢ÓëÉè¼ÆʦËæÊÖÄéÀ´ÔöÇ¿ËûÃÇµÄ Web Ç°¶ËµÄ½Å±¾ÓïÑÔ£¬Èç½ñÔ½À´Ô½±»ÖØÊÓ£¬ËäÔòÈç´Ë£¬JavaScript
ÈÔȻӵÓкܶàÈÃÈ˷ѽâµÄ¶«Î÷¡£
1. ËüÒÔ Java ÃüÃû£¬µ«²¢²»ÊÇ Java
Ëü×î³õ½Ð Mocha£¬ ½Óן ......
ÔÚ¶Ô³ÌÐò½øÐÐÐÔÄܲâÊÔʱÐèÒª¿¼Âǵ½²»Í¬¹æÄ£ÒÔ¼°²»Í¬Ëã·¨µÄЧÂʵIJ»Í¬
ÏÂÃæµÄÍøÒ³ÊÇÒ»¸ö¶ÔÅÅÐòËã·¨µÄÐÔÄܲâÊÔ£¬¹æÄ£¾ÍÊÇÊý×éµÄ³¤¶È£¬¶ø²âÊÔµÄÁ½¸öº¯Êý·Ö±ðÊÇÊÖ¶¯ÊµÏֵĿìËÙÅÅÐòËã·¨ºÍjavascriptÄÚÖõÄÅÅÐòº¯Êý¡£
<!DOCTYPE window PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- ......