html 中 select 验证问题!!!!

html 中 select 验证问题!!!!,第1张

<script language="javascript" type="text/javascript">

function check()

{

if(document.getElementById('select2').value=='')

{

alert('请选择一个!')

return false

}

return true

}

</script>

在你的form中

<form action="XX.php" method="post" onsubmit="return(check())">

<script type="text/javascript">

function check()

{ if(....){ alert('...') return false}}

</script>

<form id="form1" onSubmit="return check()">

</form>


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11960365.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-20
下一篇2023-05-20

发表评论

登录后才能评论

评论列表(0条)

    保存