artDialog is a dialog component written based on javascript. It has exquisite interfaces and friendly interfaces.
Preface:
Adaptive content
artDialog's special UI framework can adapt to content changes, and even content dynamically inserted by external programs can still adapt to it, so you don't have to consider the message content size to use it. Its message container can even center or left-align the text according to its width - all of which are native to XHTML+CSS.
Perfect interface
Its interface is perfect and can be easily used with external programs. Such as asynchronously writing messages, controlling position, size, display and hide, close, etc.
A meticulous experience
If it is not in the input state, it supports the Esc shortcut key closing; it can be specified to pop up near the element, making operation more convenient; add focus to the buttons intelligently; the golden ratio is vertically centered; the super-large response area is especially optimized for touch screen devices such as iPad; pre-caches skin images to respond faster...
Cross-platform compatibility
Compatible with: IE6+, Firefox, Chrome, Safari, Opera, iPad and other mobile devices. In addition, it can also support the fixed positioning of modern browsers, overlay pull-down controls, and alpha channel png background.
Get to the point:
artdialog Good pop-up box control
I have been in contact with artdialog for a while and I think it is pretty good to use and is relatively lightweight. I prefer the lightweight plug-in for JavaScript, which has a fast loading speed.
Its functions are also very good and full. Compared with other pop-up plug-ins, this plug-in is not only maintained, but also has few bugs, and is quite convenient to use. It is one of the most outstanding plug-ins in China.
The call method is as follows:
//Instructions below is a js that pops up the form form through artdialog and submits it through ajaxform (the form can be used to verify the form by jquery validate verification control) $(document).ready(function() {var options = {target: '#output2',success: showResponse // post-submit callback};$('#myForm').ajaxForm(options);var alt = null;$("#addHname").click(function(){alt=art.dialog({title:'Add a nickname',content: document.getElementById('g_cn'),width:750,button: [{name: 'Save',focus: true,callback: function () {$('#myForm').submit();return false;}},{name: 'Close',callback: function () {}}]});});function showResponse(data){if(alt !=null){alt.close();}if(data=='success'){artDialog.alert('Save Success');}else{art.dialog.close();artDialog.alert('Save Failed');}}});The above is a detailed explanation of the submission form ideas of the artdialog pop-up box control in JS introduced to you by the editor. I hope it will be helpful to everyone!