解决方案 »
- ASP.net Ajax怎么POST数据
- 怎样屏蔽浏览器中的地址栏
- ASP.NET 自定义Headler识别不了自定义Module里面的Html 标签
- [求助].net 2003 占用cpu100%
- Asp.net 2.0 中怎么异步调用WEB服务?
- QQ群11056001,欢迎热爱.NET的朋友加入交流
- 难题,难死我了!急!急!急!
- 如何使文件路径“c:\inetpub\wwwroot\WebApplication1”与URL“http://localhost/WebApplication1”映射到相同的服务器位置。
- 怎样在窗口关闭后,cookies过期
- 实在想不出怎么做好了,请大家帮忙看看。谢谢!!!!
- asp.net mvc网站回收后第一次运行奇慢,大家是怎么解决的?
- asp.net web开发需要使用多线程吗
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js读取cookie测试</title>
<link href="css/08nzfh-style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head><body><div class="personality">
<script type="text/javascript">
//<![CDATA[
function setCookie(name,value)
{
var Days = 30; //此 cookie 将被保存 30 天
var exp = new Date(); //new Date( "December 31, 9998 ");
exp.setTime(exp.getTime() + Days*24*60*60*1000);
document.cookie = name + "= "+ escape(value) + ";expires= "+ exp.toGMTString();
} function getCookie2(objName){//获取指定名称的cookie的值
var arrStr = document.cookie.split("; ");
for(var i = 0;i < arrStr.length;i ++){
var temp = arrStr<i>.split("=");
if(temp[0] == objName) return unescape(temp[1]);
}
}var _b = false;
//setCookie("mycookie","mycookie");
if(typeof(getCookie2("mycookie2")) != 'undefined')
{
alert(typeof(getCookie2("mycookie2")));
_b = true;
}
alert(_b);
if(_b){
document.write('<iframe id="iframe_email" name="iframe_email" frameborder="0" scrolling="no" src="http://localhost:8008/vote1.4/test_8.jsp" height="100%" width="100%"></iframe>');
}else{
document.write('<iframe src="#" style="display:none;"></iframe> 请登录');
}
//]]>
</script>