Step 1: introduce the corresponding JS
<Link href = "../extjs/resources/CSS/ext-all.css" rel = "stylesheet" type = "text/CSS"/>
<SCRIPT src = "../extjs/adapter/EXT/ext-base.js" type = "text/JavaScript"> </SCRIPT>
<SCRIPT src = "../extjs/ext-all.js" type = "text/JavaScript"> </SCRIPT>
Step 2: Write the following code:
<Script language = "JavaScript" type = "text/JavaScript">
Ext. onready (function (){
Ext. Get ('btnsave'). On ('click', function (){
Ext. msg. Wait ('processing, please wait... ', 'hprompt'); // progress bar waiting
Ext. Ajax. Request ({
Method: 'post', // get and post Methods
URL: 'ajax. ashx', // submission address
Success: function (result ){
Ext. msg. Hide ();
// Return result. responsetext
Ext. msg. Alert (result. responsetext );
},
Failure: function (result ){
// Return result. responsetext
}
});
});
});
</SCRIPT>
Step 3: Add HTML control tags
<! -- HTML button tag -->
<Input type = "button" value = "click on me" id = "btnsave"/>