我正在尝试使用jQuery UI创建一个弹出对话框表单,但生成的按钮中没有任何文本。
$(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”弹出窗口
我正在使用Google API加载的jQuery和jQuery UI
答案 0 :(得分:0)