Js Dialog removes X close in the upper right corner

  • 2020-03-30 02:42:54
  • OfStack

When you use the dialog popup, you don't want to close the X in the upper right corner, you just want to show the prompt.

I found some information on the Internet. Three solutions were found online: the first one is available.

1.
 
$("#div1").dialog({ 

closeOnEscape:false, 

open:function(event,ui){$(".ui-dialog-titlebar-close").hide();} 

}); 

I don't want the user to close the pop-up box with the x button provided by the jquery dialog. This method does not allow me to close the dialog box unless I provide a close button.

2. Add dialogClass:"no-close" to dialog -- block the function of X in the upper right corner (I have used it and it is hard to use)

3, find a popup dialog after find the style of the "x", hidden away -- -- -- -- -- -- - $(" UI - log "). Hide (); (it doesn't work when I use it.)

Related articles: