gpt4 book ai didi

javascript - 使用 AJAX 请求的内容填充 Bootstrap 模式

转载 作者:行者123 更新时间:2023-11-28 03:37:10 26 4
gpt4 key购买 nike

这是我调用文件shipper_modal.html 文件的代码。我想通过 AJAX 请求调用它并将响应放入 Bootstrap 模式中。这不起作用。

$('.modalLink1').click(function() {
$.ajax({
url: "shipper_modal.html",
cache: false:
function(result) {
$(".modal-content").html(result);
})
})

提前致谢

最佳答案

试试这个:

$('.modalLink1').click(function(){
$.ajax({
url: "shipper_modal.html",
cache: false,
success: function(result) {
$(".modal-content").html(result);
}});
});

关于javascript - 使用 AJAX 请求的内容填充 Bootstrap 模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57605721/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com