如何实现点击超链接后将后台获取的数据加载到模态框里弹出?
问题描述:
环境: vs2019 c#
尝试的方法:js 函数1:将超链接绑定页面按钮,按钮事件完成后台数据加载到模态框;js 函数2:弹出模态框;
数据确实加载了,但模态框无法弹出;也不报错。
$(function () {
$('.showdetail').click(function () {
c(a);
})
});
// 加载数据
function a() {
//加载页面数据
document.getElementById('contenttitle_tmpButton').click();
}
// 显示模态框
function b() {
$('#myModal').modal('show');
}
function c(x) {
x();
b();
}
答
$(function () {
$('.showdetail').click(function () {
a();
})
});
function a() {
$('#myModal').modal('show');
b();
}
function b() {
document.getElementById('contenttitle_tmpButton').click();
}
答
谢谢您的答复。后台数据是运行的,但模态框没有显示出来。