Dialog Box plug-in of jquery plug-in

Source: Internet
Author: User
In the process of page development, you often need to interact with users. For example, when submitting a form, if the content in the text box is blank, you need to remind the user to enter the content, the general practice is to use the alert () function in the traditional JavaScript language to pop up an information window. In addition, when deleting a record, you must also confirm the information, the confirm () function in javascript can be used. Although both functions can implement corresponding functions, they have no animation effect, have a single function, and have poor user experience. In jquery UI, the dialog (DIALOG) Plug-in not only provides the functions of alert () and confirm () functions in traditional JavaScript languages, but also provides elegant interfaces and rich functions, easy to operate. After the plug-in is imported to the page, the calling syntax code is as follows: $ (". selector "). dialog (options) where. selector indicates the DOM element. Generally, A <div> flag is specified to display the content and setting buttons of the pop-up dialog box. Option options is an object, its common parameters are as follows: 1. autoopen sets a Boolean value. If it is false, the dialog box is not displayed. By default, true2 and bgiframe set a Boolean value. If it is true, in IE6, the pop-up dialog box can hide the drop-down list box similar to the <SELECT> mark on the page, the default value is false3, button 4 in the buttons Setting dialog box, And closeonescape. If the value is false. The dialog box is closed if the ESC shortcut is not used. The default value is true5 and draggable. A boolean value is set to indicate whether the dialog box can be dragged. The default value is true6 and hide. The animation effect when the dialog box is closed, it can be set to slide and other animation effects. The default value is null7. Whether the Model Setting dialog box is displayed in Mode means that the page background is grayed out and operations are not allowed, the effect of the Focus Lock dialog box. The default value is center8. When the Position Setting dialog box is displayed, you can set the position on the page to top, left, right, bottom, the default value is center9 and the animation effect displayed in the show Settings dialog box. The relevant description is the same as the hide parameter 10. Text in the topic section of the title Settings dialog box. The default value is null. 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.