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

javascript ʹÓÃCookies

ÔÚ document ¶ÔÏóÖÐÓÐÒ»¸ö cookie ÊôÐÔ¡£µ«ÊÇ Cookie ÓÖÊÇʲô£¿“ijЩ Web Õ¾µãÔÚÄúµÄÓ²ÅÌÉÏÓúÜСµÄÎı¾Îļþ´æ´¢ÁËһЩÐÅÏ¢£¬ÕâЩÎļþ¾Í³ÆΪ Cookie¡£”—— MSIE °ïÖú¡£Ò»°ãÀ´Ëµ£¬Cookies ÊÇ CGI »òÀàËÆ£¬±È HTML ¸ß¼¶µÄÎļþ¡¢³ÌÐòµÈ´´½¨µÄ£¬µ«ÊÇ JavaScript Ò²ÌṩÁË¶Ô Cookies µÄºÜÈ«ÃæµÄ·ÃÎÊȨÀû¡£
¡¡¡¡ÔÚ¼ÌÐø֮ǰ£¬ÎÒÃÇÏÈҪѧһѧ Cookie µÄ»ù±¾ÖªÊ¶ ¡£
¡¡¡¡Ã¿¸ö Cookie ¶¼ÊÇÕâÑùµÄ£º<cookieÃû>=<Öµ>
¡¡¡¡<cookieÃû>µÄÏÞÖÆÓë JavaScript µÄÃüÃûÏÞÖÆ´óͬСÒ죬ÉÙÁË“²»ÄÜÓà JavaScript ¹Ø¼ü×Ö”£¬¶àÁË“Ö»ÄÜÓÿÉÒÔÓÃÔÚ URL ±àÂëÖеÄ×Ö·û”¡£ºóÕ߱ȽÏÄѶ®£¬µ«ÊÇÖ»ÒªÄãÖ»ÓÃ×ÖĸºÍÊý×ÖÃüÃû£¬¾ÍÍêȫûÓÐÎÊÌâÁË¡£<Öµ>µÄÒªÇóÒ²ÊÇ“Ö»ÄÜÓÿÉÒÔÓÃÔÚ URL ±àÂëÖеÄ×Ö·û”¡£
¡¡¡¡Ã¿¸ö Cookie ¶¼ÓÐʧЧÈÕÆÚ£¬Ò»µ©µçÄÔµÄʱÖÓ¹ýÁËʧЧÈÕÆÚ£¬Õâ¸ö Cookie ¾Í»á±»É¾µô¡£ÎÒÃDz»ÄÜÖ±½ÓɾµôÒ»¸ö Cookie£¬µ«ÊÇ¿ÉÒÔÓÃÉ趨ʧЧÈÕÆÚÔçÓÚÏÖÔÚʱ¿ÌµÄ·½·¨À´¼ä½ÓɾµôËü¡£
¡¡¡¡Ã¿¸öÍøÒ³£¬»òÕß˵ÿ¸öÕ¾µã£¬¶¼ÓÐËü×Ô¼ºµÄ Cookies£¬ÕâЩ Cookies Ö»ÄÜÓÉÕâ¸öÕ¾µãϵÄÍøÒ³À´·ÃÎÊ£¬À´×ÔÆäËûÕ¾µã»òͬһվµãÏÂδ¾­ÊÚȨµÄÇøÓòµÄÍøÒ³£¬ÊDz»ÄÜ·ÃÎʵġ£Ã¿Ò»“×é”Cookies Óй涨µÄ×Ü´óС£¨´óÔ¼ 2KB ÿ“×锣©£¬Ò»³¬¹ý×î´ó×Ü´óС£¬Ôò×îÔçʧЧµÄ Cookie Ïȱ»É¾³ý£¬À´ÈÃÐ嵀 Cookie“°²¼Ò”¡£
¡¡¡¡ÏÖÔÚÎÒÃÇÀ´Ñ§Ï°Ê¹Óà document.cookie ÊôÐÔ ¡£
¡¡¡¡Èç¹ûÖ±½ÓʹÓà document.cookie ÊôÐÔ£¬»òÕß˵£¬ÓÃijÖÖ·½·¨£¬ÀýÈç¸ø±äÁ¿¸³Öµ£¬À´»ñµÃ document.cookie µÄÖµ£¬ÎÒÃǾͿÉÒÔÖªµÀÔÚÏÖÔÚµÄÎĵµÖÐÓжàÉÙ¸ö Cookies£¬Ã¿¸ö Cookies µÄÃû×Ö£¬ºÍËüµÄÖµ¡£ÀýÈ磬ÔÚijÎĵµÖÐÌí¼Ó“document.write(document.cookie)”£¬½á¹ûÏÔʾ£º
name=kevin; email=kevin@kevin.com; lastvisited=index.html
ÕâÒâζ×Å£¬Îĵµ°üº¬ 3 ¸ö Cookies£ºname, email ºÍ lastvisited£¬ËüÃǵÄÖµ·Ö±ðÊÇ kevin, kevin@kevin.com ºÍ index.html¡£¿ÉÒÔ¿´µ½£¬Á½¸ö Cookies Ö®¼äÊÇÓ÷ֺźͿոñ¸ô¿ªµÄ£¬ÓÚÊÇÎÒÃÇ¿ÉÒÔÓà cookieString.split('; ') ·½·¨µÃµ½Ã¿¸ö Cookie ·Ö¿ªµÄÒ»¸öÊý×飨ÏÈÓà var cookieString = document.cookie£©¡£
¡¡¡¡É趨һ¸ö Cookie µÄ·½·¨ÊÇ¶Ô document.cookie ¸³Öµ¡£ÓëÆäËüÇé¿öϵĸ³Öµ²»Í¬£¬Ïò document.cookie ¸³Öµ²»»áɾ³ýµôÔ­ÓÐµÄ Cookies£¬¶øÖ»»áÔöÌí Cookies »ò¸ü¸ÄÔ­ÓÐ Cookie¡£¸³


Ïà¹ØÎĵµ£º

javascript StyleSheetÑùʽ²Ù×÷Àà

ÔçÉÏÔÚcsdnÉÏ¿´ÓÐÈËÎÊÒ³Ãæstyle sheetÔõôÐÞ¸ÄÀïÃæµÄrule,¾ÍдÁ˸öÀà,¸ÃÀà¶Ô¼æÈÝFFºÍIE×öÁË´¦Àí¡£
/**//*--------------------------------------------
    ÃèÊö : Ìí¼ÓеÄÑùʽrule
    ²ÎÊý : styleSheetsË÷Òý
    ´úÂë :&nb ......

Flex3ÓëÒ³ÃæJavaScriptµÄÏ໥µ÷ÓÃ

 ÈÕÇ°×öÏîÄ¿£¬ÐèÒª°ÑÒ³ÃæµÄJS´úÂë³é³öÀ´·Åµ½Ò»¸ö.jsÎļþÖУ¬ÓÉÓÚflex³ÌÐòÊÇÒÔdiv+SWFObjectµÄ·½Ê½Ç¶Èëµ½Ò³ÃæµÄ£¬ÎªÁ˴ﵽĿ±êÍøÕ¾Ö»ÐèÒªÒýÓÃÒ»¸ö.jsÎļþ¼´ÊµÏÖÒýÓÃÏîÄ¿¹¤³ÌµÄÄ¿µÄ£¬ËùÒÔÒ²Òª°ÑSWFObjectµÄ´úÂë·Åµ½.jsÎļþÖС£
˼·ÊÇÓÃdocument.write()°ÑÒýÓÃswfÎļþµÄ´úÂëд½øÒ³Ã棬Ȼºó°ÑflexÒªµ÷ÓõÄjsº¯Êý¶¼·Åµ½.j ......

JavaScript WebÁ÷³Ì¶¨Ò幤¾ß

Submitted by gouki on 2008, December 4, 11:47 PM. Javascript
ÓÃjavascript+vmlÀ´×ö¹¤×÷Á÷£¬È·ÊµÊǵÚÒ»´Î¿´µ½£¬ËùÒÔÎÒÔÚ¿´µ½ÓÐÕâ¸öÐÂÎŵÄʱºò£¬¾Í¾õµÃÌرðµÄ³Ô¾ª¡£µ±ÄêµÄTRS¾ÍÊÇÒòΪÓÐÒ»¸öactivex°æµÄ¹¤×÷Á÷¿Ø¼þµÄCMS£¬µ¼ÖÂËûµÄ¼Û¸ñ·Ç³£µÄ¸ß£¬½ñÌìÄܹ»¿´µ½ÓÐjavascript°æµÄ£¬¾ªÑÈÊÇÄÑÃâµÄ¡£¡£¡£
Ö»ÊDz¢·ÇËùÓеĻúÆ÷¶¼Ö ......

JavaScript¸øURLÖ¸¶¨±àÂë

    <script language="javascript" type="text/javascript">
// <!CDATA[
        function Test()
        {
            document.location.href = 'test. ......

javascript ѧϰ±Ê¼Ç£¨5£© ¼Ì³Ð

1. ijЩ»ùÀàÈç¹û²»Ö±½ÓʹÓÃ,¶ø½ö½öÖ»ÊÇÓÃÓÚ¸ø×ÓÀàÌṩͨÓõĺ¯Êý,ÕâÖÖÇé¿öÏÂ,»ùÀà±»¿´×÷³éÏóÀà.
2. ÔÚ javascript µÄÀàÖÐËùÓеķ½·¨ºÍÊôÐÔ¶¼ÊÇ"¹«ÓõÄ".
3. javascript Öеļ̳в¢²»ÊÇÃ÷È·¹æ¶¨µÄ,¶øÊÇͨ¹ýÄ£·ÂÀ´ÊµÏÖµÄ.ÓÐÒÔÏ·½·¨:
(1). ¶ÔÏóð³ä
function A(sColor){
this.color = sColor;
this.showColo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ