jquery ui - modal dialog (better way to create content of modal?)
问题 Is there a way to define the modal content in the javascript, rather than always having to have an element on the page and create the dialog from that? It has the title option, so I can 'dynamically' create a modal title, but what about the actual content? Like say I need it to say, "you are going to delete image #539". Rather than creating a modal for every possible image - or even from creating the element and then making the dialog from that. There's got to be a better way. 回答1: You could