Home >Web Front-end >HTML Tutorial >How to add event for close button of div window_html/css_WEB-ITnose

How to add event for close button of div window_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:05:472327browse

I want to execute a method when the close button in the upper right corner of the div window is clicked to close the div. How to do it?
This is how I initialize the div
easyloader.load(["moveFixedDialog", "combogrid", "validatebox",
"combobox", "form", "blockUI", "messager", " validMethods",
"datebox", "datagrid" ], function () {
$("#evaluateDiv").dialog({
modal:true,
closed:true,
width: 300,
height:250,
top:160
});
});


Reply to discussion (solution)

Try configuring the close callback. It should be supported. If not, check the API to see how to configure the close callback.
close:function(){
alert('close');
}

You are using a plug-in. It is more convenient to call the plug-in itself. Find it yourself

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn