复制代码 代码如下:
<title>我的聊天记录</title>
<base target="_self" />
<script src="/UploadFiles/2021-04-02/jquery-1.4.2.min.js"><script>
$(document).ready(function() {
$('a[href][href!="#"]').click(function() {
SetSelfTarget(this);
});
$('input').click(function() {
SetSelfTarget(this);
});
});
function SetTarget() {
var htmTarget = document.getElementsByTagName("head");
if ((undefined != htmTarget) && (0 < htmTarget.length)) {
var b = htmTarget[0].getElementsByTagName("base");
if ((undefined != b) && (0 < b.length)) {
b[0].target = "download";
}
}
}
function SetSelfTarget(obj) {
if (obj.id != "btn_Export") {
var htmTarget = document.getElementsByTagName("head");
if ((undefined != htmTarget) && (0 < htmTarget.length)) {
var b = htmTarget[0].getElementsByTagName("base");
if ((undefined != b) && (0 < b.length))
b[0].target = "_self";
}
}
}
</script>
<asp:Button ID="btn_Export" runat="server" Text="导出" OnClick="btn_Export_Click" OnClientClick="SetTarget()" />
<title>我的聊天记录</title>
<base target="_self" />
<script src="/UploadFiles/2021-04-02/jquery-1.4.2.min.js"><script>
$(document).ready(function() {
$('a[href][href!="#"]').click(function() {
SetSelfTarget(this);
});
$('input').click(function() {
SetSelfTarget(this);
});
});
function SetTarget() {
var htmTarget = document.getElementsByTagName("head");
if ((undefined != htmTarget) && (0 < htmTarget.length)) {
var b = htmTarget[0].getElementsByTagName("base");
if ((undefined != b) && (0 < b.length)) {
b[0].target = "download";
}
}
}
function SetSelfTarget(obj) {
if (obj.id != "btn_Export") {
var htmTarget = document.getElementsByTagName("head");
if ((undefined != htmTarget) && (0 < htmTarget.length)) {
var b = htmTarget[0].getElementsByTagName("base");
if ((undefined != b) && (0 < b.length))
b[0].target = "_self";
}
}
}
</script>
<asp:Button ID="btn_Export" runat="server" Text="导出" OnClick="btn_Export_Click" OnClientClick="SetTarget()" />
标签:
模态窗,导出文件,下载文件
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com
暂无“WEB在模态窗体里导出或下载文件功能代码”评论...