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>
$(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>
相关文章推荐
- QT5入门之1 - QT下载与安装
- 显示时间小例子
- 求N!的值
- 打印十行杨辉三角
- 解决Andriod软键盘出现把原来的布局给顶上去的方法
- 微软小娜开发教程<二>
- Ubuntu14.04环境下各种格式的安装包的使用方法
- 合并百度地图API真机和模拟器的.a文件
- Difference between val() and text()
- lua中字符串匹配笔记
- 爬爬爬之路:C语言(五) 二维数组篇
- linux下怎么查看ssh的用户登录日志
- 全面理解Unity加载和内存管理
- struts2 基本用法
- Oracle DISTINCT A 排序问题(转)
- 最小化安装centos的init初始化脚本
- node.js was not found in the default path
- RHadoop的安装与试验
- mysql体系结构
- SQL SERVER 2012启动失败 because upgrade step 'SSIS_hotfix_install.sql' 失败