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