不提交表单如何取文本框的值
提交按钮是普通按钮,按下时进行输入的验正
<SCRIPT LANGUAGE="VBScript">
<!--
sub check_onclick
if document.myform.assetbh.value=empty then
msgbox "不能为空"
document.myform.assetbh.focus
else
myform.submit
end if
end sub
// -->
</script>
运行时提示网页有错误,不知错误有哪里
提交按钮是普通按钮,按下时进行输入的验正
<SCRIPT LANGUAGE="VBScript">
<!--
sub check_onclick
if document.myform.assetbh.value=empty then
msgbox "不能为空"
document.myform.assetbh.focus
else
myform.submit
end if
end sub
// -->
</script>
运行时提示网页有错误,不知错误有哪里
if document.myform.assetbh.value=" then
'表用empty
照楼上的做,还是不行
ASP+SQL技术群:5573944 欢迎大家来共同探讨学习
网际网络技术专业群、讨论 HTML/asp等网页制作、数据库ACCESS/SQL等技术交流
上面的方法可行
function checkform(){
if (document.form.xxx.value=="){
alert('');
document.form.xxx.focus();
return false;
}
return true;
}
同意楼上的