农用车轮胎哪里有卖:正做问卷调查,请问如何用ASP、VBSCRIPT编写一段代码,来提示用户将问题回答完全!

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 12:46:37
我用的是ACCESS数据库。

这是我写的,你看看

<script language="vbscript">
sub subut_onclick()
if document.main.article_title.value="" then
alert("标题不能为空!")
document.main.article_title.focus
exit sub
end if
if document.main.article_order.value="" then
alert("排序号不能为空")
document.main.article_order.focus
exit sub
end if
if document.main.one_class.value="" then
alert("请选择类别!")
document.main.one_class.focus
exit sub
end if
if not Isnumeric(document.main.article_order.value)=true then
alert("排序号只能为数字")
document.main.article_order.focus
exit sub
end if
document.main.subutt.value="1"
document.main.submit()

end sub

</script>

在用户提交答案且时间未到的时候,检查是否有未答的题目, 然后根据情况给予提示啊

具体代码, 你写的这么简单, 没办法给出的

检测表单.如果用记某项留空的话就提示就好啊.像用户注册一样