加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – JQuery Colorbox和Forms

发布时间:2020-12-13 21:36:38 所属栏目:PHP教程 来源:网络整理
导读:我有一个表单,我想提交并在Colorbox中显示. 表格是Mals Ecommerce View Cart. 见:https://www.mals-e.com/tpv.php?tp=4 我希望它在彩盒iframe中显示购物车内容.这可以使用FORM方法而不是Link方法吗? 解决方法 这里最好的答案.. 将此添加到您的提交按钮:id
我有一个表单,我想提交并在Colorbox中显示.

表格是Mals Ecommerce View Cart.

见:https://www.mals-e.com/tpv.php?tp=4

我希望它在彩盒iframe中显示购物车内容.这可以使用FORM方法而不是Link方法吗?

解决方法

这里最好的答案..

将此添加到您的提交按钮:id =“SearchButton”

然后用这个:

$(document).ready(function() {
    $("input#SearchButton").colorbox({href: function(){
        var url = $(this).parents('form').attr('action');
        var ser = $(this).parents('form').serialize(); //alert(url+'?'+ser);
        return url+'?'+ser;
    },innerWidth:920,innerHeight:"86%",iframe:true});
});

测试时间:http://wwww.xaluan.com或http://wwww.xaluan.com/raovat/

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读