我的警报已达到并有效,但关闭方法不起作用。知道为什么吗?
我的JavaScript:
var myDialog = $('#divContactUs');
myDialog.dialog({
autoOpen: false,
title: "Send Us A Note:",
modal: true,
buttons: [{
id: "btn-send",
text: "Send",
click: function () {
// you can now use the reference to the dialog
myDialog.dialog("close");
alert('test');
}
}]
});
});
还有我的html:
<div id="divContactUs" style="display:none">
Name:   <input type="text" name="Name" /><br />
Email:   <input type="text" name="Email" /><br />
Phone:   <input type="text" name="Phone" /><br />
Message:<br />
<textarea name="Message"></textarea>
</div>