jquery - how can I make onclick function to submit just my form.php -
below code trying override:
var conf = { isvip:false, ismem:false }; var sinassoconfig = { entry : 'mail', // logintype : 0, setdomain : true, pagecharset :'utf-8', timeoutenable : true, logintimeout : 45000, custominit : function() { sinassocontroller.setlogintype(3); }, customlogincallback : function(status){ conf.logincallback(status); } }; ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: html form below:
<form action="/cgi-bin/sla.php" id="vip_login" method="post" name= "vip_login"> <div class="usernamebox"> <label class="placeholder" for="vipname">输入邮箱名</label> <input class="username" id="vipname" name="username" tabindex="1" type="text" value=""><span class="vipdomain">@vip.sina.com</span> <a class="clearname" href="#"></a> </div><span class="loginerror" style="visibility:hidden"></span> <div class="passwordbox"> <input class="password" id="vippassword" name="password" tabindex= "2" type="password" value=""> <label class="placeholder" for= "vippassword">输入密码</label> </div> <div class="mailvsn" style="display:none"> <input class="vsn" id="vipvsn" maxlength="6" name="vsn" tabindex= "3" type="text" value=""><span class="vipdomain"><a class= "vipfindvdun" href="http://vdun.sina.com.cn/report_loss" target= "_blank">微盾挂失</a></span> <label class="placeholder placeholder1" for="vipvsn">输入微盾动态码</label> </div> <div class="loginsetting clearfix"> class="forgetpas">忘记密码? <input checked="checked" id="store2" tabindex="4" type="checkbox"> <label for="store2">下次自动登录</label> <input checked="checked" id="ssl2" tabindex="5" type="checkbox"> <label for="ssl2">ssl安全登录</label> </div> <div class="safetip tip24"> 建议在网吧或公共电脑上取消保持登录选项。 </div><!--若没有验证码,设置display:none--> <div class="checkcodebox" style="display:none;"> <div class="clearfix"> <input id="vipcheckcode" name="checkcode" type="text" value= "验证码"> <img alt="" class="checkcode"> <label class= "placeholder" for="vipcheckcode">验证码</label> </div> <p class="clearfix"><a href="">看不清?换一个</a>按右图填写,不区分大小写</p> </div><a class="loginbtn" href="#" tabindex="3">登录</a> <span style= "visibility: hidden;"> </span> </form>
jquery offers trigger function want. if have form submit button, we'll call button #submit, this:
$('#someelement').click(function() { $('#submit').trigger('click'); }); the functionality simple, when element #someelement clicked, jquery trigger click event of #submit button without event physically occurring. simple clicked pie!
Comments
Post a Comment