Javascript Jquery UI对话框中的空白按钮
我试图用jqueryui创建一个弹出对话框表单,但是生成的按钮中没有任何文本Javascript Jquery UI对话框中的空白按钮,javascript,jquery,jquery-ui,modal-dialog,jquery-ui-dialog,Javascript,Jquery,Jquery Ui,Modal Dialog,Jquery Ui Dialog,我试图用jqueryui创建一个弹出对话框表单,但是生成的按钮中没有任何文本 $(function(){ $( "#dialog-form" ).dialog({ autoOpen: false, height: 300, width: 350, modal: true, resizable: false, buttons: { "OK": function() {
$(function(){
$( "#dialog-form" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
resizable: false,
buttons: {
"OK": function() {
alert("test");
$( this ).dialog( "close" );
}
}
});
生成按钮的代码如下所示:
<div class="ui-dialog-buttonset">
<button type="button" text="OK" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false">
<span class="ui-button-text"/>
</button>
</div>
此外,按钮处理程序的代码在页面加载时执行,这意味着我在加载页面时看到“test”弹出窗口
我使用的是谷歌API加载的jQuery和jQuery UI,愚蠢的我!我使用的是较旧版本的jQuery(1.3.2),它应该与jQuery UI完全兼容,但我想不是。谢谢 你能用你的代码证明这一点吗?为我找到的作品