我在 asp .net aspx 页面中有一个链接按钮。我在另一个页面中使用 jquery ui 对话框打开该页面。
从打开页面的代码中,我在新打开的页面中的按钮上放置了一个事件处理程序以关闭页面。
我的问题是即使未单击按钮也会触发事件。我的窗口出现一秒钟然后消失。
这是我的代码:
            if (hdnShowVote.val() == "True" && vote == null) {
            $("#divModal1").dialog({ height: 500, width: 800, modal: true, hide: "fade", closeOnEscape: true, closeText: "", title: "Vote", dialogClass: 'modalBare' })
            $("#ifrVote").attr("src", "CustomerVote.aspx");
            $("#ifrVote").ready(function () {
                $("#ifrVote").contents().find("#btnClose_CustomerVote").click(closeVote());
                alert($("#ifrVote").contents().find("body").length);
            });
        }
任何想法为什么会发生这种情况?