html 一个按钮谈两次窗,的Javascript必须点击两次按钮,这是形式

您好我现在面临上按一下按钮的问题之外。由于某种原因,我在表单外面有一个按钮。点击我必须验证表单并进入下一个选项卡。但是现在,即使表单有效,我也必须点击两次按钮。现在有什么问题?

DAgk7.png的Javascript必须点击两次按钮,这是形式

的script.js

$(document).ready(function() {

$('#step-2-form').submit(function(e)

{

var $as = $(this);

if($as.valid()){

e.preventDefault();

$('#dgstoneVariable').edatagrid('reload');

return document.getElementById('n.3').click();

}

if(!$as.valid()){

}

});

$('#step-2-form').validate({

rules: {

contactname2field: {

required: true

},

jobtitle2field: {

required: true

},

telephone2field: {

required: true

},

email2field: {

email: true,

required: true

},

cityfield: {

required: true

}

}

});

});

在为registration.php我有第二标签的三个选项卡我有AA结构如下:

....

....

//Here is a code of file upload. If the user browse and uploads the file then have to click continue button once to move onward. But if the user doesnt upload the files then he has to click the button twice to continue to step 3. (ANY IDEA ...???)

CONTINUE

上述按钮validtes第一形式然后进一步进行。由于文件上传表单,我必须将其放在外面。

+1

如果要放置该按钮的形式之外,那么改变的,而不是为“按钮”的类型“提交”。因为它没有道理。 –

+1

'return document.getElementById('n.3')。click();'? 这个元素n.3在哪里?而你为什么要使用本机JS这个 '返回$( '#N.3')点击();' –

+0

这哪里是元素**'n.3' **? –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值