社区
基础编程
帖子详情
出现运行期错误,缺少对象,行120,是怎么回事?怎么解决?
small
2002-03-06 02:41:37
我的网页中有javascript.
...全文
147
10
打赏
收藏
出现运行期错误,缺少对象,行120,是怎么回事?怎么解决?
我的网页中有javascript.
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
10 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
海盗2019
2002-03-07
打赏
举报
回复
if ((document.hyzc.yhm.value!="") && (document.hyzc.email.value!="")
lvxing
2002-03-06
打赏
举报
回复
分特
=== 和 !== 是 PHP 里的嚴格判斷, JS 里沒有的
zxyufan
2002-03-06
打赏
举报
回复
!==
分特~~~老大~~~应该是 !=
David017
2002-03-06
打赏
举报
回复
实际上,你出错的这句,是重复的,上面已经判断过了。
可以直接return true;
if (document.hyzc.yhm.value!=="")and (document.hyzc.email.value!=="")
{
return true;
}
David017
2002-03-06
打赏
举报
回复
!== 多写一个 = 或者是多写了一个!
and 不是javascript关键字,用&&
if后面的用()括起来。
David017
2002-03-06
打赏
举报
回复
120/118行:
if (document.hyzc.yhm.value!=="")and (document.hyzc.email.value!=="")
修改为:
if ((document.hyzc.yhm.value!="") && (document.hyzc.email.value!=""))
small
2002-03-06
打赏
举报
回复
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>基本信息</title>
</head>
<body>
<form method="POST" action="hy.php" onsubmit="return checkform();" name="hyzc">
<div align="center">
<center>
<table width="90%" border="1" cellspacing="0" align="center" bordercolor="#66CCFF">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0" height="218" bgcolor="#FFFFFF" bordercolor="#FF0000">
<tr>
<td width="100%" colspan="2" height="41" bgcolor="#66CCFF">
<p align="center"><font size="2"><b><font color="#0000FF">基本信息</font></b></font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" height="23" align="right"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2" color="#FF0000">*</font><font size="2">用户名:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="yhm" size="20">
(最大长度为12位有效字符,必须填写)</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">职务:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="zw" size="52">
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">工作单位:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF" bordercolor="#993300"><font size="2">
<input type="text" name="dw" size="52">
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">单位电话:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="tel" size="20">
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">收信(支票)的地址与姓名:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF">
<textarea rows="2" name="ad_na" cols="37"></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2" color="#FF0000">*</font><font size="2">电子信箱:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="email" size="39">
(必须填写)</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">其它联系方法:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="method" size="39">
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
</table>
<div align="center"></div>
</td>
</tr>
</table>
</center>
</div>
<p> </p>
<p align="center"><input type="submit" value="提交" name="B1">
<input type="reset" value="全部重写" name="B2"></p>
</form>
</body>
<script language="javascript">
function checkform()
{
if (document.hyzc.yhm.value=="")
{
alert("请输入用户名!");
return false;
}
if (document.hyzc.email.value=="")
{
alert("请输入电子信箱!");
return false;
}
if (document.hyzc.yhm.value!=="")and (document.hyzc.email.value!=="")
{
return true;
}
}
</script>
</html>
这是源码。
small
2002-03-06
打赏
举报
回复
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>基本信息</title>
</head>
<body>
<form method="POST" action="hy.php" onsubmit="return checkform();" name="hyzc">
<div align="center">
<center>
<table width="90%" border="1" cellspacing="0" align="center" bordercolor="#66CCFF">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0" height="218" bgcolor="#FFFFFF" bordercolor="#FF0000">
<tr>
<td width="100%" colspan="2" height="41" bgcolor="#66CCFF">
<p align="center"><font size="2"><b><font color="#0000FF">基本信息</font></b></font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" height="23" align="right"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2" color="#FF0000">*</font><font size="2">用户名:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="yhm" size="20">
(最大长度为12位有效字符,必须填写)</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">职务:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="zw" size="52">
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">工作单位:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF" bordercolor="#993300"><font size="2">
<input type="text" name="dw" size="52">
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">单位电话:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="tel" size="20">
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">收信(支票)的地址与姓名:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF">
<textarea rows="2" name="ad_na" cols="37"></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2" color="#FF0000">*</font><font size="2">电子信箱:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="email" size="39">
(必须填写)</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
<tr>
<td width="30%" height="23" align="right" bgcolor="#D1EAFC"><font size="2">其它联系方法:</font></td>
<td width="70%" height="23" bgcolor="#FFFFFF"><font size="2">
<input type="text" name="method" size="39">
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="23" align="right" colspan="2"> </td>
</tr>
</table>
<div align="center"></div>
</td>
</tr>
</table>
</center>
</div>
<p> </p>
<p align="center"><input type="submit" value="提交" name="B1">
<input type="reset" value="全部重写" name="B2"></p>
</form>
</body>
<script language="javascript">
function checkform()
{
if (document.hyzc.yhm.value=="")
{
alert("请输入用户名!");
return false;
}
if (document.hyzc.email.value=="")
{
alert("请输入电子信箱!");
return false;
}
if (document.hyzc.yhm.value!=="")and (document.hyzc.email.value!=="")
{
return true;
}
}
</script>
</html>
darzui
2002-03-06
打赏
举报
回复
那应该是javascript的问题
rosen
2002-03-06
打赏
举报
回复
代码贴出来
python判断语法
错误
、逻辑
错误
、
运
行
错误
_Python
错误
和异常
简述程序中的
错误
一般被称为 Bug,无可否认,这几乎总是程序员的错。。。程序员的一生,始终伴随着一件事 - 调试(
错误
检测、异常处理)。反反复复,最可怕的是:不仅自己的要改,别人的也要改。。。一万头草泥马奔腾而过!
错误
程序
错误
,主要分为三类:语法
错误
逻辑
错误
运
行
时
错误
语法
错误
语法
错误
(也称:解析
错误
):是指不遵循语言的语法结构引起的
错误
(程序无法正常编译/
运
行
)。在编译语言(例如:C++)中,语法...
【Python】
错误
和异常
Python
错误
与异常处理指南 语法
错误
(Syntax Error)是代码不符合Python语法规则时发生的
错误
,如
缺少
冒号、缩进
错误
或拼写
错误
。Python会在解析阶段检测到这些
错误
并阻止程序
运
行
。
运
行
时异常(Exception)则是程序执
行
过程中遇到的
错误
,如除以零或类型转换
错误
。 Python使用try-except语句处理异常,可捕获特定异常类型,并提供else和finally子句分别处理无异常和必须执
行
的场景。用户还可以通过raise主动抛出异常,或继承Exception类创建自定义异常。合理使用
汇总Oracle报错信息及
解决
办法
1、
错误
提示ORA-00933: SQL command not properly ended in?
解决
方案:2、 ORA-01830:日
期
格式图片在转换整个输入字符串之前结束
解决
方案:3、ORA-01652:无法通过 128 (在表空间 TEMP 中) 扩展 temp 段之前
运
行
没有出错,出差错后,把整段代码删除后重贴,
错误
就
解决
了,很奇怪。
解决
方案:4、ORA-00955: 名称已由现有
对象
使用:
解决
方案:5、ORA-01861: 文字与格式字符串不匹配:
解决
方案:6、ORA-00904:标示符无效
IT程序员不得不知道的程序
出现
的
错误
类型
即使是最牛叉的程序员,他们在程序开发过程的各个阶段也可能发生
错误
,但是他们有着丰富的
解决
错误
的能力。下面简要分析这些
错误
。 我们可以将程序设计中的
错误
分成五类: 第一类,编译
期
错误
。何谓编译, 编译就是把高级语言变成计算机可以识别的2进制语言,计算机只认识1和0,编译程序把人们熟悉的语言换成2进制的。 编译程序把一个源程序翻译成目标程序的工作过程分为五个阶段:词法分析;语法分析;语
python出错类型有哪些_python中异常有哪些?python中异常的详细介绍
本篇文章给大家带来的内容是关于python中异常有哪些?python中异常的详细介绍,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。python的异常分为两种,1)、语法
错误
,在python解释器的语法检测中不通过不能
运
行
代码 2)、异常,python程序
运
行
期
检测到的
错误
被称为异常。在没有做异常处理时,将终止程序并提示异常信息,如:①字符串转换为数字时的类型转换异常,②文件...
基础编程
21,891
社区成员
140,342
社区内容
发帖
与我相关
我的任务
基础编程
从PHP安装配置,PHP入门,PHP基础到PHP应用
复制链接
扫一扫
分享
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章