您的位置:首页 > 其它

layer弹窗与ajaxSubmit的使用

2015-10-14 16:47 330 查看
<script type="text/javascript">

$(function(){
$("#loginBtn").click(function() {

    $("#register-form").ajaxSubmit({

            clearForm: false,

            dataType: "JSON",

            success: function(responseText, statusText) {

                if (statusText == "success") {

                    if (responseText.result == 1) {

                        parent.window.location.href=responseText.retUrl

                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
parent.layer.close(index)

                    } 

              }

            

            },

            error: function() 

            }

        });

    });

})

</script>

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: