<div> <form action="/registe/m" id='verify' method='post'> {%csrf_token%} <input type="text" id='username' name="username" value=''><br> <input type="password" id='password' name="password" value=''><br> <input type='hidden' id='a' name="a"> <input type='hidden' id='s' name="s"> <input type='hidden' id='params' name="params"> <input type="button" οnclick="formSubmit()" value="Registe"> </form> </div> <script> var a = 'FF'; var s= 'n'; var username = document.getElementById('username').value; var password = document.getElementById('password').value; function formSubmit(){ document.getElementById('a').value=a; document.getElementById('s').value=s; document.getElementById('params').value=params; document.getElementById('verify').submit(); }
form表单中写入button按钮的提交
最新推荐文章于 2022-03-10 08:53:25 发布