--- --- restore content begins
Sometimes the use of the form, will not necessarily be used in the form of input_submit to submit the form data, may use a, button, etc. instead of
Then naturally thought of action submitted form data in a JS
<head> <meta charset="utf-8"> <title>注册</title> <link rel="stylesheet" type="text/css" href="css/reg.css" />
<script type="text/javascript"> function submit(){ $("#click").submit(); } </script>
</head>
<form action="loginControl" method="post" id="click"> <p> 用户名:<input type="text" name="username" id="username" value="" /> </p> <a href="#" onclick="document.getElementById('click').submit();return false;">注册</a> </form>
Click on a label so that you can perform submit event
--- end --- restore content