表单必填

摘要:<script> $(function(){ $('.tj').click(function(){ if($('#xm').val()==''){alert('请输入姓名!');return false;} if($('#hm').val(


<script>

$(function(){

$('.tj').click(function(){

if($('#xm').val()==''){alert('请输入姓名!');return false;}

if($('#hm').val()==''){alert('请输入手机!');return false;}

if($('#nr').val()==''){alert('请输入内容!');return false;}

})

})

</script>

这行要填写到 提交里



class="tj"


<script type="text/javascript">

function check(theform){

if(theform.dkje.value == "") {

alert("请添写您要贷款的金额!")

theform.dkje.focus();

return false;

}

   if(theform.dkqx.value == "") {

alert("请添写您要贷款的期限!")

theform.dkqx.focus();

return false;

}

   if(theform.name.value == "") {

alert("请添写您的姓名!")

theform.name.focus();

return false;

}

if(theform.tel.value == "") {

alert("请添写您的手机号码!")

theform.tel.focus();

return false;

}

}

</script>



这行要填写到 提交里

onClick="return check(this.form)"

上一篇:dede织梦文章页获取上一篇下一篇的链接地址

下一篇:search/dede搜索