Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ajax成功后,如何在模式上显示隐藏按钮?_Javascript_Jquery_Html_Ajax - Fatal编程技术网

Javascript ajax成功后,如何在模式上显示隐藏按钮?

Javascript ajax成功后,如何在模式上显示隐藏按钮?,javascript,jquery,html,ajax,Javascript,Jquery,Html,Ajax,在ajax成功后,我试图显示一个隐藏的按钮,但我没有做到。任何帮助都将不胜感激。谢谢你抽出时间 $.ajax({ url: url, type: 'POST', data: fd, success: function (data) { // alert(data); disable_enable_features('resetForm'); console.lo

在ajax成功后,我试图显示一个隐藏的按钮,但我没有做到。任何帮助都将不胜感激。谢谢你抽出时间

$.ajax({
        url: url,
        type: 'POST',
        data: fd,
        success: function (data) {
            // alert(data);
            disable_enable_features('resetForm');
            console.log(data);
            $('.modal-title-message').html(''); 
            $('.modal-body-message').html('Some text'); 
            $('#closeModal').show();
            $('#exampleModal').modal('show');

        },
        cache: false,
        contentType: false,
        processData: false,
        timeout: 45000
    });

接近

给按钮和id,然后:

$('#buttonId').show()

更新:

其他选择:

$('#exampleButton').css("display", "none"); // for hide
$('#exampleButton').css("display", ""); // for show

然后,向按钮提供密码和id:

$('#buttonId').show()

更新:

其他选择:

$('#exampleButton').css("display", "none"); // for hide
$('#exampleButton').css("display", ""); // for show
为按钮添加ID,等等“exampleButton” 然后,在成功之后,你要做:

$("#exampleButton").show()
更新

将ID添加到按钮等“exampleButton” 然后,在成功之后,你要做:

$("#exampleButton").show()

更新你做了正确的事:

$('#closeModal').show(); //this correctly undoes your hide
你的问题可能来自其他地方,你确定你正在进入你的功能吗


您应该使用浏览器的调试控制台并设置断点。

您做了正确的事情:

$('#closeModal').show(); //this correctly undoes your hide
你的问题可能来自其他地方,你确定你正在进入你的功能吗


您应该使用浏览器的调试控制台并设置断点。

是的,我正在使用该函数。刚刚尝试了一个console.log,工作正常,但仍然无法显示按钮。是的,我正在进入该功能。刚刚尝试了一个console.log,工作正常,但仍然无法显示按钮。