1
我有一个对话框,使用下面生成的代码javascript和HTML创建。我想为按钮和容器添加“style = font-size:0.9em;”删除“ui-button-text-only”类。jQuery-UI:删除类对话框
你能帮我吗?
感谢,
HTML:
<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button">
<span class="ui-button-text">Save</span>
</button>
<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button">
<span class="ui-button-text">Cancel</span>
</button>
<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button">
<span class="ui-button-text">Delete</span>
</button>
</div>
的Javascript:
<div id="dialogProduct" title="MyTitle"></div>
<script type="text/javascript">
function CreateDialogProduct() {
$("#dialogProduct").dialog({
bgiframe: true, autoOpen: false, minHeight: 350, maxHeight: 450, height: 350,
minWidth: 450, maxWidth: 550, width: 450,
modal: true,
buttons: {
Save: function() {
$.ajax({
type: "POST",
url: "/Product/SaveOrUpdate",
data: {...},
success: function(data) {...},
error: function(XMLHttpRequest, textStatus, errorThrown) {
}
})
},
Cancel: function() {...},
Delete: function() {
$.ajax({
type: "POST",
url: "/Product/Delete",
data: {...},
success: function(data) {},
error: function(XMLHttpRequest, textStatus, errorThrown) {
}
})
}
},
beforeclose: function(event, ui) {
}
});
}
jQuery(document).ready(function() {
CreateDialogProduct();
});
</script>
谢谢:)没有可能将 “FONT-SIZE:0.9em” 在一个类中的.css文件? – 2010-03-09 07:34:59
@Kris是的,请参阅更新。 – Amarghosh 2010-03-09 07:56:18