Home > Backend Development > PHP Tutorial > thinkphp中表单提交有关问题

thinkphp中表单提交有关问题

WBOY
Release: 2016-06-13 13:30:25
Original
1106 people have browsed it

thinkphp中表单提交问题
thinkphp中,如下代码:我用一个button键没让他提交他怎么老自动提交,我得先验证成功在提交,验证失败直接跳走,可是他每次都提交,怎么搞啊,请thinkphp高手帮忙啊



用户修改密码页面





 
 
 
 
用户名:
旧密码:
新密码:
确认新密码:

 




------解决方案--------------------
function check(){
if(myform.pw.value=="" || myform.pw2.value==""){
alert(密码不能为空);
return false;
}
if(myform.pw.value != myform.pw2.value)
{
alert("两次输入的新密码不相同");
document.location.href='__URL__/modpwindex';
}else{
document.getElementById("myfoid").submit();
}
}
------解决方案--------------------
探讨

function check(){
if(myform.pw.value=="" || myform.pw2.value==""){
alert(密码不能为空);
return false;
}
if(myform.pw.value != myform.pw2.value)
{
alert("两次输入的新密码不相同");
document.location.href='__URL……

------解决方案--------------------

------解决方案--------------------
myform.pw.value之类的写法在火狐里面是无效的
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template