聚四氟乙烯用途:判断为空--VBSCRIPT

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 03:20:35
<script language="vbscript">
function checkform()
dim msg
if len(trim(theForm.title.value))=0 then
msg=MsgBox("error",48,"err")
msg.show()
theForm.title.focus()
Exit Function
else
theForm.submit
end if
end function
</script>
<form id="theForm" name="theForm" method="post" action="message_main.asp" >
<input type="submit" name="Submit" value="提交" onclick=checkForm()>
</form>
虽然是有个对话框弹出,但是它还是会提交,我想要的是弹出对话框确定后,不提交!应该怎么弄!
coolapp
你说的我试了,它提示是:类型不匹配:'return'

麻烦回答的高手们,确定无错误在发~!~
我试了几遍了,JS就没有问题

改动如下
1.
<input .. onClick="return checkForm()">

2.
function checkform()
dim msg
if len(trim(theForm.title.value))=0 then
alert('标题不能为空!')
theForm.title.focus()
checkform=false
Exit Function
else
checkform=true
end if
end function

好高深啊