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 arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null) return unescape(arr[2]); return '';
}
function setCookie(name, value, expires, path, domain, secure)
{
var liveDate = new Date();
expires = liveDate.setTime(liveDate.getTime() + expires*60*1000);//ºÁÃë
//expires = new Date((new Date()).getTime() + expires * 60000);//°´·ÖÖÓ
document.cookie = name + "=" + escape (value) +
((expires) ? "; expires=" + expires : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}
ÒÔÏÂÍøÉÏÕÒµÄ×ÊÁÏ:
—————————————————
js cookie×ܽá
×î½üÐèÒªÓÃFSO²Ù×÷Îļþ£¬ÓÐÕâÑùÒ»¸öÐèÇó£¬ÓÃjs²Ù×Ýcookie±£´æÓû§ÉÏ´ÎÒ»´ò¿ªÎļþµÄ·¾¶£¬·¢ÏÖÓÃjs²Ù×÷cookieºÍÓ÷þÎñÆ÷ÓïÑÔ²Ù×÷ cookieÓÐһЩ²îÒ죬»¹ÓкܶàСµÄϸ½ÚÐèҪעÒ⣬Èç¹ûÔËÓò»µÃµ±»áÒý·¢ºÜ¶à²»¿ÉÔ¤ÁϵĽá¹û¡£µ±ÎÒÓöµ½ÎÊÌâµÄʱºòÔÚÍøÉϲéÁ˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬·¢Ïֺö඼ÊǼòµ¥ÒÔÀíÂ۵ķ½Ê½½éÉÜÁËjsÈçºÎ²Ù×÷cookie¡£µ«ÎÒÕÕ×Å×öÈ´·¢ÏÖÓÐЩµØ·½¸ù±¾¾Í²»ÊÇÕâô»ØÊ£¬ÏÂÃæÎÒ×ܽáÁËÎÒÔÚÓÃjs²Ù×÷cookieµÄһЩ¾Ñé¡£
ÓÃjs²Ù×ÝcookieÊÇͨ¹ýdocument¶ÔÏóϵÄcookie¶ÔÏó£¬Æäʵdocument.cookie¾ÍÊÇ×Ö·û´®£¬
ËùÒÔÎÒÃÇʹÓÃËü¾ÍÏñʹÓÃ×Ö·û´®Ò»Ñù£¬¿ÉÒÔʹÓÃ×Ö·û´®µÄËùÓз½·¨£¬Ö»²»¹ýÕâ¸ö×Ö·û´®ÐèÒªÓиö¸ñʽ(key=value
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
ÏÖÔÚÍøÒ³ÉϵÄ×ÖÌåÊÇÔ½À´Ô½Ð¡£¬±ð˵ÊÇÊÓÁ¦Ç·¼ÑÕß¾ÍÊǺÃÑÛ¾¦¿´¾ÃÁËÒ²ÌÛµÄÄÑÊÜ£¬ÓÚÊDZàдÁËÏÂÃæÕâ¶ÎС½Å±¾£¬½¨ÒéÍøÒ³ÖÆ×÷ÈËÄܹ»¼Óµ½ÍøÒ³´úÂëµÄ< head>ÖУ¬ÒÔ·½±ãÈõÊÓÈËȺ·Å´óä¯ÀÀ(½öÊÊÓÃÓÚIEä¯ÀÀÆ÷)£¡
¡¡¡¡´úÂëÈçÏ£º
¡¡¡¡< script language="javascript">
¡¡¡¡var i=0;
¡¡¡¡document.onkeydown = zoom;
¡¡¡¡ ......
Õⲿ·Ö˵һÏÂ×î½ü·Ç³£Á÷ÐеÄʼþ´úÀí¡£Ê¼þ´úÀíµÄʵÏÖ¼òµ¥À´Ëµ£¬ÊÇ°Ñʼþ°ó¶¨µ½Ä¿±êÔªËصÄ×æÏÈÔªËØÉÏ£¬È»ºóͨ¹ýðÅÝ»ò²¶»ñµÃµ½Ê¼þÔ´£¬È»ºóÔÙÅж¨Ê¼þÔ´ÊÇ·ñµÈÓÚÄ¿±êÔªËØÔÙÖ´Ðлص÷º¯Êý¡£ÓÉÓÚ¶ÔÄ¿±êÔªËصÄÅж¨ÓÐʱ·Ç³£Ä£ºý£¬Òò´Ëͨ¹ýÅж¨¼´¿Éµ÷Óûص÷º¯Êý£¬ÕâÑù£¬ÎÒÃǾʹﵽһ¸ö¼àÌýÆ÷ΪÐí¶àʼþÔ´·þÎñµÄÄ¿µÄ¡£¶ÔÓÚÐÔÄÜÒ»Ïò ......
<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server"> </script>
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">
<title ......
JScript ÔËÐÐʱ´íÎó
¡¡¡¡JScript ÔËÐÐʱ´íÎóÊÇÖ¸µ± JScript ½Å±¾ÊÔͼִÐÐÒ»¸öϵͳ²»ÄÜÔËÐеĶ¯×÷ʱµ¼ÖµĴíÎó¡£µ±ÕýÔÚÔËÐнű¾¡¢¼ÆËã±äÁ¿±í´ïʽ¡¢»òÕßÕýÔÚ¶¯Ì¬·ÖÅäÄÚ´æʱ³öÏÖ JScript ÔËÐÐʱ´íÎóʱ¡£
´íÎóºÅ ÃèÊö
5029 Êý×鳤¶È±ØÐëΪһÓÐÏÞÕýÕûÊý
5030 ±ØÐ븳¸øÊý×鳤¶ÈÒ»¸öÓÐÏÞÕýÊý
5028 ÐèÒª Array »ò arguments ......