本文共 1035 字,大约阅读时间需要 3 分钟。
有问题的
Using HTML in a Dialog's title in jQuery UI 1.10
$.widget("ui.dialog", $.extend({}, $.ui.dialog.prototype, { _title: function(title) { if (!this.options.title ) { title.html(" "); } else { title.html(this.options.title); } }}));
没问题的
样例
//设置角色function checkRole(userId){ var dialog = $("#dlgCheckRole").load(contextPath+"/role/checkRole?userId="+userId).removeClass('hide').dialog({ modal: true, title: "", //title: "设置角色", //title_html: true, width: 600, height: 600, //auto buttons: [ { text: "Cancel", "class" : "btn btn-minier", click: function() { $( this ).dialog( "close" ); } }, { text: "OK", "class" : "btn btn-primary btn-minier", click: function() { //$( this ).dialog( "close" ); saveCheckRole(); } } ], close: function(){ //销毁dialog及内在元素 $(this).dialog("destroy").empty(); } }); //设置标题 //$('#dlgCheckRole').dialog("option","title", " ");}
参考:
转载地址:http://tymhd.baihongyu.com/