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

javascriptдcookieµÄһЩ·½·¨

º¯ÊýÒ»¡¢Ð´cookieµÄº¯Êý£¬½«CookieдÈë¿Í»§¶Ë£¬Í¨Óú¯Êý£¬´«Èë3¸ö²ÎÊý¼´¿É£¨CookieÃû×Ö£¬ÖµºÍʧЧÆÚ£©
//º¯Êý£ºÐ´Èëcookie
function WriteCookie (cookieName, cookieValue, expiry)
{
var expDate = new Date();
if(expiry) //Èç¹ûÉèÖÃÁËcookieʧЧʱ¼ä;
{
expDate.setTime (expDate.getTime() expiry);
document.cookie = cookieName "=" escape (cookieValue) "; expires=" expDate.toGMTString();
}
else //ûÓÐÉèÖÃcookieʧЧʱ¼ä;
{
document.cookie = cookieName "=" escape (cookieValue);
}
}
º¯Êý¶þ¡¢È¡µÃ±íµ¥Êý¾Ý
//º¯Êý£ºÈ¡µÃform±íµ¥ÓòµÄÖµ×÷ΪcookieµÄÏà¹ØÖµ£¨cookie name,cookie value,expires£©
function setCookie ()
{
var name = document.myform.text1.value;
var value = document.myform.text2.value;
var num = document.myform.text3.value;
var select = document.myform.text3.selectedIndex;
if (name=="" || value=="" || num==""){
alert ("ÇëÊäÈëCookieµÄÃû×Ö,ÖµºÍʧЧÆÚÔÙ²âÊÔ!");
return false;
}
if(num == 0)
{
WriteCookie(name, value, 0);
}
else if(select == 0)
//Èç¹ûÑ¡ÔñµÄÊÇÌì;ʱ¼ä»»Ëã³ÉÃë;
{
WriteCookie(name, value, 1000 * 60 * 60 * 24 * num);
}
else if(select == 1)
//Èç¹ûÑ¡ÔñµÄÊÇÔÂ;
{
WriteCookie(name, value, 1000 * 60 * 60 * 24 * num * 31);
}
else if(select == 2)
//Èç¹ûÑ¡ÔñµÄÊÇÄê;
{
WriteCookie(name, value, 1000 * 60 * 60 * 24 * num * 365);
}
alert ("CookieÒѾ­±£´æ")
}
º¯ÊýÈý¡¢¶ÁcookieµÄÖµ
function ReadCookie (CookieName) {
var CookieString = document.cookie;
var CookieSet = CookieString.split (';');
var SetSize = CookieSet.length;
var CookiePieces
var ReturnValue = "";
var x = 0;
for (x = 0; ((x < SetSize) && (ReturnValue == "")); x ) {
CookiePieces = CookieSet[x].split ('=');
if (CookiePieces[0].substring (0,1) == ' ') {
CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length);
}
if (CookiePieces[0] == CookieName) {
ReturnValue = CookiePieces[1];
}
}
alert ("Cookie Value is:" ReturnValue);
}
HTML±íµ¥ÄÚÈÝ£º
<form name=myform>
<table width="95%" border="0" cellspacing="0" cellpadding="2">
&


Ïà¹ØÎĵµ£º

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

jLayout — JavaScript Layout Algorithms


The jLayout JavaScript library provides layout algorithms for laying out components. A component is an abstraction; it can be implemented in many ways, for example as items in a HTML5 Canvas drawing or as HTML elements. The jLayout library allows you to focus on drawing the individual components i ......

javascript String.replaceº¯Êý

    javascriptµÄStringÀàÄÚÖú¯Êýreplace(regexp, newString)º¯ÊýÌṩÁË×Ö·û´®Ìæ»»¹¦ÄÜ£¬´Óº¯ÊýÔ­ÐÍÉÏ¿ÉÒÔ¿´³öÖ§³Ö Regular Exp¡£´Ëº¯Êý¹¦Äܷdz£ÊµÓ㬵«Ò²Óм¸¸öµØ·½Óеã»ìÏý£¬ÏÂÃæͨ¹ýʵ¼ÊµÄÀý×ÓÀ´ËµÃ÷£º
    ±ÈÈçÎÒÃÇÏÖÔÚÒªÕë¶Ô´®
var src="<a href=&quot;http://xx.com/a/2010 ......

href=¡°#¡±Óëhref=¡°javascript:void(0)¡±Çø±ð

ʹÓùýajaxµÄ¶¼³£¼ûÕâÑùµÄ´úÂ룺
<a href="javascript:doTest2();void(0);" mce_href="javascript:doTest2();void(0);">here</a>
µ«Õâ¶ùµÄvoid(0)¾¿¾¹ÊǺκ¬ÒåÄØ£¿
JavascriptÖÐvoidÊÇÒ»¸ö²Ù×÷·û£¬¸Ã²Ù×÷·ûÖ¸¶¨Òª¼ÆËãÒ»¸ö±í´ïʽµ«ÊDz»·µ»ØÖµ¡£
void ²Ù×÷·ûÓ÷¨¸ñʽÈçÏ£º
1. jav ......

JavaScript¾­µäÓï¾ä¼°Æä»ù±¾Ó¦ÓÃ

¡ö´ò¿ª¡ö
<input name=Button onClick=document.all.WebBrowser.ExecWB(1,1) type=button value=´ò¿ª>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
¡öÁí´æΪ¡ö
<input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) typ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ