- 注册时间
- 2016-12-29
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 98
- 精华
- 0
- 帖子
- 26
|
1、父页面:
//弹出批量导入页面
function batchImport() {
mini.open({
url: '../xxx/xxx, //页面地址
title: '批量导入', //标题
width: 860,
height: 570,
showCloseButton: true, //显示关闭按钮
showMaxButton: true, //显示最大化按钮
showModal: true, //显示遮罩
loadOnRefresh: false, //true每次刷新都激发onload事件
onload: function () { //弹出页面加载完成
},
ondestroy: function (action) { //弹出页面关闭前
if (action == "ok") {
grid.reload();
}
}
});
}
2、子页面:
方式①报错:Cannot read property 'getComponents' of null(子页面打开后直接关闭时报错)
<script src="~/Scripts/boot.js" type="text/javascript"></script>
<script src="~/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="~/Scripts/jquery.ui.widget.js" type="text/javascript"></script>
<script src="~/Scripts/jquery.fileupload/jquery.iframe-transport.js" type="text/javascript"></script>
<script src="~/Scripts/jquery.fileupload/jquery.fileupload.js" type="text/javascript"></script>
方式②报错:$(...).fileupload is not a function(使用fileupload上传文件时报错)
<script src="~/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="~/Scripts/jquery.ui.widget.js" type="text/javascript"></script>
<script src="~/Scripts/jquery.fileupload/jquery.iframe-transport.js" type="text/javascript"></script>
<script src="~/Scripts/jquery.fileupload/jquery.fileupload.js" type="text/javascript"></script>
<!--注意:上面的js会导致报错“Cannot read property 'getComponents' of null”,故boot.js放到最后加载-->
<!--后发现放到最后fileupload就会报错-->
<script src="~/Scripts/boot.js" type="text/javascript"></script>
|
|