Use of ext learning _ component (window, prompt box)
Source: Internet
Author: User
1 window contains floating, drag, close, maximize, and minimize features [html] vari0; functionnewWin () {varwinnewExtWindow ({title: & quot; window & quot; + I ++, width: 400, height: 300, 1. the window contains floating, drag, close, maximize, and minimize features [html] var I = 0; function newWin () {var win = new Ext. window ({title: "Window" + I ++, width: 400, height: 300, maximizable: true}); win. show ();} Ext. onReady (function () {Ext. get ("btn "). on ("click", newWin) ;}); [html] Prompt box: [html] Ext. messageBox. alert ("Please note", "this is the prompt box for ExtJS"); Ext. messageBox. confirm ("Please confirm", "whether you really want to delete the specified content", function (button, text) {alert (button); alert (text) ;}); Ext. messageBox. confirm ("confirm", "whether to delete the specified content", function (button, text) {if (button = "yes ") {// execute the delete operation alert ("deleted successfully") ;}}); Ext. messageBox. prompt ("Enter prompt box", "Enter your New Year's wishes:", function (button, text) {if (button = "OK ") {alert ("your New Year's wish is:" + text);} else alert ("You gave up inputting! ") ;}); Three buttons prompt box, yes, no, cancel [html] Ext. msg. show ({title: 'save data', msg: 'You have performed some data operations. Do you want to save changes to the current content? ', Buttons: Ext. msg. YESNOCANCEL, // three buttons: yes, no, cancel fn: save, // call the following method icon: Ext. messageBox. QUESTION}) ;}); function save (button) {if (button = "yes") {// execute the data save operation} else if (button = "no ") {// do not save data} else {// cancel current operation }}
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