社区
ASP
帖子详情
错误: 'null' 为空或不是对象
ahbbdbc
2008-01-23 11:16:17
行: 44
字符: 3
错误: 'null' 为空或不是对象
代码: 0
URL: http://localhost/pfyljd/index.asp
大家看看这个问题怎么解决 谢谢
...全文
1739
8
打赏
收藏
错误: 'null' 为空或不是对象
行: 44 字符: 3 错误: 'null' 为空或不是对象 代码: 0 URL: http://localhost/pfyljd/index.asp 大家看看这个问题怎么解决 谢谢
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
iceblockchina
2008-01-23
打赏
举报
回复
帖代码出来吧
yalan
2008-01-23
打赏
举报
回复
把代码贴上来吧
tony-杨
2008-01-23
打赏
举报
回复
检查js对象是否存在
或者写法是否符合你调试的浏览器标准
sy_binbin
2008-01-23
打赏
举报
回复
把你的代码贴出来
不要你本地 的URL地址
西安风影
2008-01-23
打赏
举报
回复
这里有问题:
onMouseOver=aa('
Down
')
function aa(Dir)
{tt.doScroll(Dir);Timer=setTimeout('aa("'+
Dir
+'")',100)}//这里100为滚动速度
function StopScroll(){if(Timer!=null)clearTimeout(Timer)}
如果参数是纯数字,那么就没有问题,可惜偏偏是字符串,那么就出问题了。
原因:
'aa("'+Dir+'")'被翻译后,就等同于aa(Down),
此时执行时就发现Down并不是一个已经定义的变量
,所以Down就不是对象了,而如果是数字 就没有这个问题。
解决方法
一般通过匿名函数传递参数比较好
setTimeout(function(){aa(Dir)},100)
iceblockchina
2008-01-23
打赏
举报
回复
太长了,看着晕啊!是IE不?自己用开启调试状态(),运行页面报错时点“是”追踪进去就可以直接定位在出错的地方了。可能是某个JS对象不存在或者没有取到应该取的值。
sy_binbin
2008-01-23
打赏
举报
回复
没看出来啥毛病
JS也不没抱错
ahbbdbc
2008-01-23
打赏
举报
回复
在index.asp中
<tr>
<td width="239" rowspan="4" valign="top"><!--#include file="left.htm"--></td>
<td valign="top"><!--#include file="dh.htm"--></td>
</tr>
<tr>
在left.htm 是这个文件有问题
<HTML>
<HEAD>
<!--#include file="../Admin.asp"-->
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT>
function aa(Dir)
{tt.doScroll(Dir);Timer=setTimeout('aa("'+Dir+'")',100)}//这里100为滚动速度
function StopScroll(){if(Timer!=null)clearTimeout(Timer)}
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
<link href="adminstyle.css" rel="stylesheet" type="text/css">
<title>安徽</title></HEAD>
<body leftmargin="0">
<div align="center"></div>
<div align="center"></div>
<TABLE cellSpacing=1 cellPadding=0 width=158 align=center class="a2">
<TBODY>
<TR align="center" class="a3"> </TR>
<TR align="center" class="a3"> </TR>
<TR align="center" class="a3">
<TD height=15
background=images/title_bg_quit.gif class=menu_title onMouseOver="this.className='menu_title2';"
onmouseout="this.className='menu_title';"><span><b><a href="../Loginout.asp" target="_top" class="logout"><font color=#FF0000>退出系统</font></a></b></span></TD>
</TR>
</TBODY>
</TABLE>
<script>
var he=document.body.clientHeight-105
document.write("<div id=tt style=height:"+he+";overflow:hidden>")
</script>
<strong><span> </span></strong>
<TABLE cellSpacing=1 cellPadding=0 width=158 align=center class="a2">
<TBODY>
<TR align="center" class="a1">
<TD class=menu_title id=menuTitle1
onmouseover="this.className='menu_title2';" onclick=showsubmenu(0)
onmouseout="this.className='menu_title';" style=cursor:hand
height=25><strong><SPAN> 系统管理 </SPAN></strong></TD>
</TR>
<TR align="center" class="a3">
<TD id=submenu0 style="DISPLAY: none">
<DIV class=sec_menu style="WIDTH: 156px"> <strong><span>
</span></strong>
<TABLE cellāSpacing=0 cellPadding=0 width=135 align=center>
<TBODY>
<TR align="center">
<TD height=20><a href="../manage.asp" target="mainFrame">服务器变量</a></TR>
<TR align="center">
<TD height=20><a href="../manage_admin.asp" target="mainFrame">管理员管理</a> </TD>
</TR>
</TBODY>
</TABLE>
<div align="center"><span>
</span> </div>
</DIV>
</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=1 cellPadding=0 width=158 align=center class="a2">
<TBODY>
<TR align="center" class="a1">
<TD class=menu_title id=menuTitle1
oānmouseover="this.className='menu_title2';" onclick=showsubmenu(2)
onmouseout="this.className='menu_title';" style=cursor:hand
height=25><strong><SPAN><b> </b></SPAN>客服中心</strong></TD>
</tr>
<TR align="center" class="a3">
<TD id=submenu2 style="DISPLAY: none">
<DIV class=sec_menu style="WIDTH: 156px"> <strong><span><b>
</b></span></strong>
<TABLE cellSpacing=0 cellPadding=0 width=135 align=center>
<TBODY>
<TR align="center"> </TR>
<TR align="center">
<TD height=20> <a href="../Manage_Book.asp" target="mainFrame">信息反馈</a> </TD>
</TR>
<TR align="center"> </TR>
<TR align="center"> </TR>
</TBODY>
</TABLE>
<div align="center"></div>
</DIV> </TD>
</tr></TBODY></TABLE>
<TABLE cellSpacing=1 cellPadding=0 width=158 align=center class="a2">
<TBODY>
<TR align="center" class="a1">
<TD class=a2 id=menuTitle1
onmouseover="this.className='menu_title2';"
onmouseout="this.className='menu_title';"
height=25><strong><font color="#FF0000">版权信息</font></strong></TD>
</TR>
<TR align="center" class="a3">
<TD> <DIV class=sec_menu style="WIDTH: 156px">
<br>
<TABLE cellSpacing=0 cellPadding=0 width=135 align=center>
<TBODY>
<TR>
<TD height=20> <p align="center"><font color="#0066CC">企业站点管理系统</font><br>
<br>
<font color="#0066CC">安徽</font><br>
<BR>
</p> </TD></TR></TBODY></TABLE>
<br>
</DIV></TD></TR></TBODY></TABLE>
<table cellspacing="0" cellpadding="0" width="158" align="center" class="a2">
<TR align="center" class="a1">
<td align="center" onMouseOver=aa('Down') onMouseOut=StopScroll()><font face="Webdings"
color="#FFFFFF">6</font>
</td>
</tr>
</table>
大家帮看看
消息:
'null'
为
空
或不是
对象
在画号jsp界面之后,发现了一个问题,点击界面按钮,出现如下
错误
消息“消息:
'null'
为
空
或不是
对象
” , 该消息阻止了整个界面的下一个流程。 经过查看代码才发现,是自己在书写标签的时候写错了,估计谁都不会...
java.lang.NullPointerException: null 针对于用isEmpty判断
对象
是否为
空
---springboot
通过isEmpty判断一个null
对象
,则会报java.lang.NullPointerException: null
空
指针的
错误
下图属性声明但未初始化 若中途未初始化,menu.getChildren()则返回一个null,直接报错。 解决方法: ①换一个判
空
...
出现JS
错误
提示null为
空
或不是
对象
的
错误
对于我遇到这个问题,仅仅针对自己的项目中写的代码 ...将其转换为json处理就能处理这个数据库没有值而导致bug的问题 或者在数据库里给他添加几条数据!! (不是通用方法,仅用于个人记录!!)
错误
提示“为
空
或不是
对象
”的解决方法
错误
提示“为
空
或不是
对象
”的解决方法 今天调试首页,Companion.js 提示,countdown 为
空
或不是
对象
。 我检查了一下 javascript 代码,发现没有什么问题。是不是 include 了其它页面有相同的名字的 ...
弹出窗口
错误
出现
对象
为 null 或未定义
经过查询有些人说是IE9以上的...无法获取属性“element”或者什么的的值:
对象
为 null 或未定义 后来 把IIS程序池该网站的环境改为2.0就可以了。因为2.0环境在webconfig做了点调整,环境统一为2.0,结果就正常了。
ASP
28,391
社区成员
357,059
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章