我需要在警告框中更改"确定"按钮的样式.
<head>
<script type="text/javascript">
function show_alert() {
alert("Hello! I am an alert box!");
}
</script>
</head>
<body>
<input type="button" onclick="show_alert()" value="Show alert box" />
</body>Run Code Online (Sandbox Code Playgroud)
我想使用jQueryUI对话框模仿标准的JavaScript confirm().我在考虑以下内容,但我显然不明白它应该如何运作.有什么建议?谢谢
return $("#dialog-cancel").dialog("open");
$("#dialog-cancel").dialog({
autoOpen: false,height: 400,width: 350,modal: true,
open: function(event, ui){},
buttons: {'OK': function(){$(this).dialog("close");return true;},'CANCEL': function() {$(this).dialog("close");return false;}}
});
Run Code Online (Sandbox Code Playgroud)