看这段程序:
// Retrieve the value of the cookie with the specified name.
function GetCookie(sName)
{
// cookies are separated by semicolons
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++)
{
// a name/value pair (a crumb) is separated by an equal sign
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
} // a cookie with the requested name does not exist
return null;
}
// Retrieve the value of the cookie with the specified name.
function GetCookie(sName)
{
// cookies are separated by semicolons
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++)
{
// a name/value pair (a crumb) is separated by an equal sign
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
} // a cookie with the requested name does not exist
return null;
}
解决方案 »
- iframe src 重定向问题
- plupload上传组件如何接收返回值???
- 如何用js获取链接的网址??
- 数组问题,100分 请教高手
- 关于document.execCommand ("SaveAs",true,"baidu.doc")这个命令
- 我想輸入用戶的ID後 換行自動帶出用戶其他的信息 於是想用onmouseover(),onmouseout() 調用****.do 實現對action類 ****.java 的操作, 查出用戶信息..... 請賜教 先謝謝了 !!!!!!!
- 求js混淆和加缩器
- 如何js判断两个表单内容不能相同
- 网页传数据问题
- 如何最简单的修改注册表的两个键值?(决非恶意修改)
- 一个简单问题!!==>>页面b打开页面a,a关闭时返回值到b中的文本框里,这样写对吗?<A HREF='#' onClick="javascript:self.opener.form[0
- 请问大家。为什么有时候找得到控件的ID,有时候却找不到?这是怎么回事?
var arr = str.split(/,/);
for (var i=0; i < arr.length; i++)
alert(arr[i]);