Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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±à³Ì±Ê¼Ç

ÐÂÖÐ……
1¡¢Êý¾ÝÀàÐÍÑéÖ¤ÎÊÌâ
  Asp.NetËäÈ»ÓÐÑéÖ¤¿Ø¼þ£¬µ«ÊÇÓÐЩ¸´ÔÓµÄÑéÖ¤»¹Êǵô«µ½·þÎñÆ÷ÉϽøÐУ¬ÓÃjsËٶȺÍÐÔÄܶ¼±È½ÏºÃ
<script>
 //¼ì²éÊÇ·ñΪÈÎÒâÊý£¨ÊµÊý£©
function isNumeric(strNumber) {
var newPar=/^(-|\+)?\d+(\.\d+)?$/
alert(newPar.test(strNumber)); }
 //¼ ......

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Îļþ¼°Îļþ¼Ð²Ù×÷

JavascriptÎļþ¼°Îļþ¼Ð²Ù×÷
 
Ò»¡¢¹¦ÄÜʵÏÖºËÐÄ£ºFileSystemObject ¶ÔÏó
    ÒªÔÚjavascriptÖÐʵÏÖÎļþ²Ù×÷¹¦ÄÜ£¬Ö÷Òª¾ÍÊÇÒÀ¿¿FileSystemobject¶ÔÏó¡£
¶þ¡¢FileSystemObject±à³Ì
ʹÓÃFileSystemObject ¶ÔÏó½øÐбà³ÌºÜ¼òµ¥£¬Ò»°ãÒª¾­¹ýÈçϵIJ½Ö裺 ´´½¨FileSystemObject¶ÔÏó¡¢Ó¦ÓÃÏà¹Ø·½·¨¡¢· ......

ÖÊÊý Javascript ֮ǰµÄÄǸöÓеãС벡

<mce:script type="text/javascript"><!--
document.write("<table border=1px border-color=red>"); //±í¸ñ¿ªÊ¼
for (h = 1; h <= 10; h++) {
document.write("<tr>"); //¿ªÊ¼µÚÒ»ÐÐ
for (s = 1; s <= 10; s++) {
var num = (h-1)*10+s; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ