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

Cookies½ÒÃØ [Asp.Net, Javascript]

Ò»£¬Ç°ÑÔ
CookiesÏë±ØËùÓÐÈ˶¼Á˽⣬ µ«ÊÇδ±ØËùÓÐÈ˶¼¾«Í¨¡£±¾ÎĽ²½âÁËCookiesµÄ¸÷·½Ãæ֪ʶ£¬ ²¢ÇÒÌá³öÀ´ÁË×î¼Ñʵ¼ù¡£ÕâÊDZÊÕßÔÚÈÕ³£¹¤×÷ÖеĻýÀۺͳÁµí¡£
¶þ£¬»ù´¡ÖªÊ¶
1.ʲôÊÇCookies
Cookie ÊÇһС¶ÎÎı¾ÐÅÏ¢£¬°éËæ×ÅÓû§ÇëÇóºÍÒ³ÃæÔÚ Web ·þÎñÆ÷ºÍä¯ÀÀÆ÷Ö®¼ä´«µÝ¡£Cookie °üº¬Ã¿´ÎÓû§·ÃÎÊÕ¾µãʱ Web Ó¦ÓóÌÐò¶¼¿ÉÒÔ¶ÁÈ¡µÄÐÅÏ¢¡£
ÀýÈ磬Èç¹ûÔÚÓû§ÇëÇóÕ¾µãÖеÄÒ³ÃæʱӦÓóÌÐò·¢Ë͸ø¸ÃÓû§µÄ²»½ö½öÊÇÒ»¸öÒ³Ã棬»¹ÓÐÒ»¸ö°üº¬ÈÕÆÚºÍʱ¼äµÄ Cookie£¬Óû§µÄä¯ÀÀÆ÷ÔÚ»ñµÃÒ³ÃæµÄͬʱ»¹»ñµÃÁ˸à Cookie£¬²¢½«Ëü´æ´¢ÔÚÓû§Ó²ÅÌÉϵÄij¸öÎļþ¼ÐÖС£
ÒÔºó£¬Èç¹û¸ÃÓû§ÔÙ´ÎÇëÇóÄúÕ¾µãÖеÄÒ³Ã棬µ±¸ÃÓû§ÊäÈë URL ʱ£¬ä¯ÀÀÆ÷±ã»áÔÚ±¾µØÓ²ÅÌÉϲéÕÒÓë¸Ã URL ¹ØÁªµÄ Cookie¡£Èç¹û¸Ã Cookie ´æÔÚ£¬ä¯ÀÀÆ÷±ã½«¸Ã Cookie ÓëÒ³ÇëÇóÒ»Æð·¢Ë͵½ÄúµÄÕ¾µã¡£È»ºó£¬Ó¦ÓóÌÐò±ã¿ÉÒÔÈ·¶¨¸ÃÓû§ÉϴηÃÎÊÕ¾µãµÄÈÕÆÚºÍʱ¼ä¡£Äú¿ÉÒÔʹÓÃÕâЩÐÅÏ¢ÏòÓû§ÏÔʾһÌõÏûÏ¢£¬Ò²¿ÉÒÔ¼ì²éµ½ÆÚÈÕÆÚ¡£
Cookie ÓëÍøÕ¾¹ØÁª£¬¶ø²»ÊÇÓëÌض¨µÄÒ³Ãæ¹ØÁª¡£Òò´Ë£¬ÎÞÂÛÓû§ÇëÇóÕ¾µãÖеÄÄÄÒ»¸öÒ³Ã棬ä¯ÀÀÆ÷ºÍ·þÎñÆ÷¶¼½«½»»» Cookie ÐÅÏ¢¡£Óû§·ÃÎʲ»Í¬Õ¾µãʱ£¬¸÷¸öÕ¾µã¶¼¿ÉÄÜ»áÏòÓû§µÄä¯ÀÀÆ÷·¢ËÍÒ»¸ö Cookie£»ä¯ÀÀÆ÷»á·Ö±ð´æ´¢ËùÓÐ Cookie¡£
Cookie °ïÖúÍøÕ¾´æ´¢ÓйطÃÎÊÕßµÄÐÅÏ¢¡£Ò»°ãÀ´Ëµ£¬Cookie ÊÇÒ»ÖÖ±£³Ö Web Ó¦ÓóÌÐòÁ¬ÐøÐÔ£¨¼´Ö´ÐÐ״̬¹ÜÀí£©µÄ·½·¨¡£³ý¶ÌÔݵÄʵ¼Ê½»»»ÐÅÏ¢µÄʱ¼äÍ⣬ä¯ÀÀÆ÷ºÍ Web ·þÎñÆ÷¼ä¶¼ÊǶϿªÁ¬½ÓµÄ¡£¶ÔÓÚÓû§Ïò Web ·þÎñÆ÷·¢³öµÄÿ¸öÇëÇó£¬Web ·þÎñÆ÷¶¼»áµ¥¶À´¦Àí¡£µ«ÊÇÔںܶàÇé¿öÏ£¬Web ·þÎñÆ÷ÔÚÓû§ÇëÇóҳʱʶ±ð³öÓû§»áÊ®·ÖÓÐÓá£ÀýÈ磬¹ºÎïÕ¾µãÉ쵀 Web ·þÎñÆ÷¸ú×Ùÿλ¹ºÎïÕߣ¬ÕâÑùÕ¾µã¾Í¿ÉÒÔ¹ÜÀí¹ºÎï³µºÍÆäËûµÄÓû§Ìض¨ÐÅÏ¢¡£Òò´Ë£¬Cookie ¿ÉÒÔ×÷ΪһÖÖÃûƬ£¬ÌṩÏà¹ØµÄ±êʶÐÅÏ¢°ïÖúÓ¦ÓóÌÐòÈ·¶¨ÈçºÎ¼ÌÐøÖ´ÐС£
ʹÓà Cookie Äܹ»´ïµ½¶àÖÖÄ¿µÄ£¬ËùÓÐÕâЩĿµÄ¶¼ÊÇΪÁË°ïÖúÍøÕ¾¼ÇסÓû§¡£ÀýÈ磬һ¸öʵʩÃñÒâ²âÑéµÄÕ¾µã¿ÉÒÔ¼òµ¥µØ½« Cookie ×÷Ϊһ¸ö Boolean Öµ£¬ÓÃËüÀ´Ö¸Ê¾Óû§µÄä¯ÀÀÆ÷ÊÇ·ñÒѲÎÓëÁËͶƱ£¬ÕâÑùÓû§±ãÎÞ·¨½øÐеڶþ´ÎͶƱ¡£ÒªÇóÓû§µÇ¼µÄÕ¾µãÔò¿ÉÒÔͨ¹ý Cookie À´¼Ç¼Óû§ÒѾ­µÇ¼£¬ÕâÑùÓû§¾Í²»±Øÿ´Î¶¼ÊäÈëƾ¾Ý¡£
2.CookiesÈçºÎ´æ´¢
Cookies±£´æÔÚÓû§µÄ±¾µØ»úÆ÷ÉÏ£¬²»Í¬µÄä¯ÀÀÆ÷´æ´¢ÔÚ²»Í¬µÄÎļþ¼ÐÖУ¬²¢ÇÒ°´ÕÕÓòÃû·Ö±ð±£´æ¡£¼´ÍøÕ¾Ö®¼äµÄCookies²»»á±Ë´Ë¸²¸Ç¡£
IEä¯ÀÀÆ÷µÄÓû§¿ÉÒÔͨ¹ýÔÚ±¾µØµÄÎĵµÖÐÕÒµ½CookiesµÄtxtÎļþ£¬ ²»Í¬²


Ïà¹ØÎĵµ£º

GOOGLEµÄ¡¶³Ô¶¹³¬ÈË¡·JavaScript LOGOÓÎÏ·

Ô­ÎĵØÖ·£ºhttp://blog.zenw.org/index/view/id/8
¾ÍÔڸղţ¬Ê¹ÓÃGOOGLE²é¿´Ã÷ÌìµÄÌìÆø£¬¿´µ½ÁËGOOGLEΪ¼ÍÄ³Ô¶¹³¬ÈË¡·30ÖÜÄê¶ø¸üеġ¶³Ô¶¹³¬ÈË¡·JavaScript LOGOÓÎÏ·¡£ºÜÓÐÒâ˼¡£¶øÇÒ»¹Ö§³ÖË«´ò£¨Ô­À´µÄ“ÊÖÆø²»´í”°´Å¥±»ÉèÖÃΪÁËË«´òÆô¶¯°´Å¥“Insert Coin”£©¡£À´ÊÔÊÔ°É¡£
ÈçÏÂͼ
¸Õ¸Õ½øÈëºó ......

»ùÓÚ¹¦Äܸü·á¸»µÄ»ù´¡À๹½¨Äú×Ô¼ºµÄ ASP.NET Ò³Ãæ

»ùÓÚ¹¦Äܸü·á¸»µÄ»ù´¡À๹½¨Äú×Ô¼ºµÄ ASP.NET Ò³Ãæ
·¢²¼ÈÕÆÚ : 11/4/2004 | ¸üÐÂÈÕÆÚ : 11/4/2004
Dino Esposito
Wintellect
ÊÊÓ÷¶Î§£º
Microsoft ASP.NET
Microsoft ASP.NET 2.0
ÕªÒª£ºÍ¨¹ý¼Ì³Ð¿ÉÒÔÔÚͨÓà Microsoft ASP.NET ÀࣨÀýÈç Page ÀࣩÖÐÌí¼Ó¹¦ÄÜ¡£ÕâΪÄúÌṩÁËÒ»¸ö¹«¹²³¡Ëù£¬Ê¹Äú¿ÉÒÔÌí¼Ó¹¦Äܲ¢½«¹¦Äܲ¿ ......

¡¶ASP.NET MVC°¸Àý½Ì³Ì¡·Ë÷ÒýÌù

      ±¾ÏµÁÐÎÄÕÂͨ¹ýÒ»¸öÐéÄâµÄ°¸Àý——¡¶MVC¹«¸æ·¢²¼ÏµÍ³¡·µÄ¿ª·¢¹ý³Ì£¬È«ÃæչʾÁËASP.NET MVCµÄ»ù±¾Ê¹Ó÷½·¨£¬Í¬Ê±ÔÚÌÖÂÛÁËÕâ¸ö¿ò¼ÜµÄ»ù±¾Ô­Àí¡£
      Õâ¸öÎÄÕÂϵÁеÄÄ¿µÄ¾ÍÊÇʹÅóÓÑÃǸüÇáËɵÄÈëÃÅASP.NET MVC¡£
      Õâ¸öϵ ......

µãµãµÎµÎ(JavaScript)

½ûֹѡÔñ
    unselectable="on"(off): IE/Opera
    style="-moz-user-select:none": FireFox(JS:element.style.MozUserSelect = "none";)
    style="-khtml-user-select:none": Safari(JS:element.style.KhtmlUserSelect)
    ons ......

Javascript ÐÞ¸Ä URL ²ÎÊý


String.prototype.changeQuery = function(name,value)
{
var reg = new RegExp("(^|)"+ name +"=([^&]*)(|$)");
var tmp = name + "=" + value;
if(this.match(reg) != null)
{
return this.replace(eval(reg),tmp);
}
else
{
if(this.match("[\?]"))
{
return this + ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ