没加(),搞清楚用的那种语言三<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"><script language="javascript">
<!--
function check(){
if (IsNul(form1.text1))
window.alert ("the first is null");
else
if (isnul(form1.text2 ))
window.alert ("the second is null");
else
if (isnul(form1.text3 ))
window.alert ("the third is null");
else
return true
}
//-->
</script>
</HEAD>
<BODY bgcolor="#cccccc">
<form name="form1" action="" method="post">
<table border=1 width=500>
<tr>
<td>1</td>
<td><INPUT type="text" id=text1 name=text1></td>
</tr>
<tr>
<td>2</td>
<td><INPUT type="text" id=text2 name=text2></td>
</tr>
<tr>
<td>3</td>
<td><INPUT type="text" id=text3 name=text3></td>
</tr>
<tr>
<td><INPUT type="button" value="Submit" name=submit1 onclick="javascript:if (check()){form1.action ='test2.asp'};"></td>
<td><INPUT type="reset" value="Reset" id=reset1 name=reset1></td>
</tr>
</table>
</form>
</BODY>
</HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"><script language="javascript">
<!--
function check(){
if (IsNul(form1.text1))
window.alert ("the first is null");
else
if (isnul(form1.text2 ))
window.alert ("the second is null");
else
if (isnul(form1.text3 ))
window.alert ("the third is null");
else
return true
}
//-->
</script>
</HEAD>
<BODY bgcolor="#cccccc">
<form name="form1" action="" method="post">
<table border=1 width=500>
<tr>
<td>1</td>
<td><INPUT type="text" id=text1 name=text1></td>
</tr>
<tr>
<td>2</td>
<td><INPUT type="text" id=text2 name=text2></td>
</tr>
<tr>
<td>3</td>
<td><INPUT type="text" id=text3 name=text3></td>
</tr>
<tr>
<td><INPUT type="button" value="Submit" name=submit1 onclick="javascript:if (check()){form1.action ='test2.asp'};"></td>
<td><INPUT type="reset" value="Reset" id=reset1 name=reset1></td>
</tr>
</table>
</form>
</BODY>
</HTML>
解决方案 »
- 当下做网站开发用什么最好?
- 关于ajax,求问!
- 关于ext layout的问题,高手帮忙看看那
- 散发了,欢迎大家测试用Ext2.0做的网站!
- 请教这样正则表达式如何写
- 用jQuery做一个菜单的展开与收起的例子,出不来效果哪位大侠帮忙看看该怎么改
- 怎样替换“ 标题:”中的
- 如何使iframe不盖住div?
- 请问怎样实现像window资源管理器中详细资料那样
- 当单击了一个<a herf="xx" onclick="getpath();></a>链接后,去到javascript的函数中执行得到一个绝对路径,此时xx变成了"c:\x.doc",但
- asp 中如何调用wsh,错误提示缺少对象WScript
- 实在没分了,还请大家多指教,另开贴100分
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"><script language="javascript">function check(){
if(form1.text1 == "") //here
window.alert ("the first is null");
else
if(form1.text2 == "") //here
window.alert ("the second is null");
else
if(form1.text3 == "") //here
window.alert ("the third is null");
else
return true;
}</script>
</HEAD>
<BODY bgcolor="#cccccc">
<form name="form1" action="" method="post">
<table border=1 width=500>
<tr>
<td>1</td>
<td><INPUT type="text" id=text1 name=text1></td>
</tr>
<tr>
<td>2</td>
<td><INPUT type="text" id=text2 name=text2></td>
</tr>
<tr>
<td>3</td>
<td><INPUT type="text" id=text3 name=text3></td>
</tr>
<tr>
<td><INPUT type="button" value="Submit" name=submit1 onclick="javascript:if(check()){form1.action ='test2.asp'};"></td>
<td><INPUT type="reset" value="Reset" id=reset1 name=reset1></td>
</tr>
</table>
</form>
</BODY>
</HTML>
麻烦帮忙再看看!
谢谢啦