我用asp.net做一网站,其中有两个页面,将他们的smartnavigation属性设为false一点问题没有,设为true则分别提示问题"Microsoft JScript 运行时错误: 'contentWindow.document' 为空或不是对象
","Microsoft JScript 运行时错误: 缺少对象",请问谁碰到过这个问题,究竟是怎么回事?该怎么解决?
","Microsoft JScript 运行时错误: 缺少对象",请问谁碰到过这个问题,究竟是怎么回事?该怎么解决?
smartnavigation属性设为true 会对一些页面的脚本 和css都有影响
你是想 刷新页面后保存位置吗
环境为VS.NET 2000和VS.NET 2003通过<script language="javascript">
function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}function getCookieVal (offset)
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function SetCookie (name, value)
{
document.cookie = name + "=" + escape (value)
}
</script>在body中加入
<body bgColor="#f1f5f5" leftMargin="0" topMargin="0" rightMargin="0" MS_POSITIONING="GridLayout" onload="document.body.scrollTop=GetCookie('posy')" onunload="SetCookie('posy',document.body.scrollTop)">