ÓÃ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½Å±¾ÓïÑԵĻù±¾¹¹³ÉÊÇÓÉ¿ØÖÆÓï¾ä¡¢º¯Êý¡¢¶ÔÏó¡¢·½·¨¡¢ÊôÐÔµÈ,À´ÊµÏÖ±à³ÌµÄ¡£
Ò»¡¢
³ÌÐò¿ØÖÆÁ÷
¡¡¡¡ÔÚÈκÎÒ»ÖÖÓïÑÔÖУ¬³ÌÐò¿ØÖÆÁ÷ÊDZØÐëµÄ£¬ËüÄÜʹµÃÕû¸ö³ÌÐò¼õС»ìÂÒ£¬Ê¹Ö®Ë³Àû°´ÆäÒ»¶¨µÄ·½Ê½Ö´ÐС£ÏÂÃæÊÇ
JavaScript³£ÓõijÌÐò¿ØÖÆÁ÷½á¹¹¼°Óï¾ä:
£±¡¢ifÌõ¼þÓï¾ä
¡¡»ù±¾
¸ñʽ
if£¨±íÊöʽ£©
Óï¾ä¶Î£±£»
......
ʹÓÃä¯ÀÀÆ÷µÄÄÚ²¿¶ÔÏóϵͳ,
¿ÉʵÏÖÓëHTMLÎĵµ½øÐн»»¥¡£ËüµÄ×÷ÓÃÊǽ«Ïà¹ØÔªËØ×éÖ¯°ü×°ÆðÀ´£¬Ìṩ¸ø³ÌÐòÉè¼ÆÈËԱʹÓ㬴Ӷø¼õÇá±à³ÌÈ˵ÄÀͶ¯£¬Ìá¸ßÉè¼ÆWebÒ³ÃæµÄÄÜÁ¦¡£
Ò»¡¢
ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷ÓÃ
¡¡¡¡³ýÁËÇ°ÃæÌáµ½¹ýµÄÎĵµdocument¶ÔÏóÍ⣬Navigatorä¯ÀÀÆ÷Öл¹ÌṩÁË´°¿Ú£¨Window£©¶ÔÏóÒÔ¼°ÀúÊ·£¨History£©ºÍÎ»Ö ......
1.Ê×ÏÈÏÂÔØSyntaxHighlighter.
2.½âѹµ½SyntaxHighlighterĿ¼ÖÐ.
3.½¨Á¢HTMLÎļþ:
<pre name="code" class="Ruby">
...Ruby´úÂë...
</pre>
¿ÉÒÔÓ¦ÓÃÔÚpreºÍtextareaÁ½ÖÖHTML±êÇ©ÄÚ,nameΪcode,classΪҪ×ÅÉ«µÄÓïÑÔ,ÏÖÔÚÖ§³ÖC, C#, CSS, Delphi, Java, JScript, Php, Pyth ......
ͻȻ¼äÏëÈ¥ÏÂÊ×fire in the holeµÄÁåÉù£¬ÓÚÊÇÓÃsosoÕÒÁËһϣ¬½øÈëÁËÊÖ»úÀÖÔ° £¨http://download.shouji.com.cn/do/wave?html=&inputname=wave&wname=Fire+in+the+hole+&thsubmit=%E6%90%9C%E7%B4%A2£©£¬Ñ¡Ôñfire in the hole£¬µ¯³ö¸ö´°¿Ú£¬ÌáʾÈÃÊäÈëÊÖ»úºÅÂë¡£ÔÎËÀ£¬²»¾ÍÏÂÊ׸èÂ»¹²»ÈÃÖ±½ÓÏ¡£ºÇºÇ£¬·¢ÏÖÍ ......