这是我的简单 jquery,它在 IE 中运行良好,但在 FF 和 Chrome 中无法运行
function publishRedirects() {
if (window.confirm("Are you sure want to publish the redirects?")) {
callJquery();
}
}
function callJquery() {
$('#btnPublish').click(function () {
$("#dialog").attr('title', 'Publishing').text('Publishing Please Wait').append("<img src='../images/loading11.gif' id='myNewImage' />").dialog({
draggable: false,
resizable: false,
modal: true,
closeOnEscape: false,
open: function (event, ui) {
$("a.ui-dialog-titlebar-close").remove();
}
});
});
}
这是我的 HTML:
<body> <div id="dialog"></div> <input name="btnPublish" class="button1" type="button" id="btnPublish" value="Publish" onClick="publishRedirects()"> <script type="text/javascript" src="../script/jquery.js"></script> <script type="text/javascript" src="../script/jquery-ui.js"></script> </body>