Home >Backend Development >PHP Tutorial >form 提交 验证有关问题

form 提交 验证有关问题

WBOY
WBOYOriginal
2016-06-13 11:38:13763browse

form 提交 验证问题
比如

" method="GET" onsubmit="add()">
   input->get('call');?>" />

 



<script><br /> function add(){<br /> var call= $("#call").attr("value");<br /> if(call== ""){<br /> alert("NO");<br /> return false;<br /> }<br /> }<br /> <br /></script>

---------------------------------------------------------
我的问题是,这样实现提交form 表单的时候先js 验证是否为空,然后在跳到后台去验证。
function url js php
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn