我做的是百度登陆
POST 成功后得到的是这段代码
<!--STATUS OK-->
<html><head><title>用户登录 </title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<META http-equiv='Pragma' content='no-cache'>
</head>
<body>
<script>
var url="http://hi.baidu.com/sys/checkuser/oxiangsunyanzi/space"
url=url.replace(/^\.\//gi,"http://passport.baidu.com/");
location.href=url;
</script>
</body>
</html> 然后我把 http://hi.baidu.com/sys/checkuser/oxiangsunyanzi/space 在IE上直接敲上也不行 说我没有登陆
因为Cookies 里边的数据没在IE 上请求高手 能让我用POST 提交后 得到 登陆后 http://hi.baidu.com/sys/checkuser/oxiangsunyanzi/space 这个页的源代码 万分感谢 !!! 而不是上边那些代码 分不是很多 谢谢帮忙
POST 成功后得到的是这段代码
<!--STATUS OK-->
<html><head><title>用户登录 </title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<META http-equiv='Pragma' content='no-cache'>
</head>
<body>
<script>
var url="http://hi.baidu.com/sys/checkuser/oxiangsunyanzi/space"
url=url.replace(/^\.\//gi,"http://passport.baidu.com/");
location.href=url;
</script>
</body>
</html> 然后我把 http://hi.baidu.com/sys/checkuser/oxiangsunyanzi/space 在IE上直接敲上也不行 说我没有登陆
因为Cookies 里边的数据没在IE 上请求高手 能让我用POST 提交后 得到 登陆后 http://hi.baidu.com/sys/checkuser/oxiangsunyanzi/space 这个页的源代码 万分感谢 !!! 而不是上边那些代码 分不是很多 谢谢帮忙
解决方案 »
- WPF中定制DataGrid各行各列样式
- .NET Framework 4 居然没有 ControlDesigner?!
- 为什么每次读到数组的最后一个地址就出错了、?尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
- 继承变量问题
- 求VS2010水晶报表下载!!!
- 请教在WinForm应用中画流程图的实现方法~~
- 怎样去触发DotNetBar中控件的ExploreBar中按扭事件
- session读取出错
- 用oledb读取excel文件时,excel版本是多少?求告知!感谢!
- 有价值的问题:大家都是如何学习.NET技术的?
- C#中利用栈求表达式的值
- 想问下,WPF及WCF的项目要如何测试性能问题?
<html><head><title>用户登录 </title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<META http-equiv='Pragma' content='no-cache'>
</head>
<body>
<script>
var passCookie={
get:function(key){
var a,reg = new RegExp("(^| )" + key + "=([^;]*)(;|"+"\x24"+")");
if(a = document.cookie.match(reg))
return unescape(a[2]);
}
};
if(passCookie.get("J_MY")=='0'){
var url="./"
url=url.replace(/^\.\//gi,"http://passport.baidu.com/");
location.href=url;
}else{
// location.href="http://my.baidu.com/index.html?my=1&tn=baidu_myps_pg";
location.href="http://www.baidu.com";
}
</script>
</body>
</html>
设置cookie
var passCookie={
get:function(key){
var a,reg = new RegExp("(^| )" + key + "=([^;]*)(;|"+"\x24"+")");
if(a = document.cookie.match(reg))
return unescape(a[2]);
}
};if(passCookie.get("J_MY")=='0'){
var url="./"
url=url.replace(/^\.\//gi,"http://passport.baidu.com/");
location.href=url;
}else{
// location.href="http://my.baidu.com/index.html?my=1&tn=baidu_myps_pg";
location.href="http://www.baidu.com";
}
</script>