Ext-JS Question:

Suppose to show our message when any paragraph in our test page is clicked, what is the extjs code on paragraph click?

Tweet Share WhatsApp

Answer:

Ext.onReady(function() {
Ext.select('p').on('click', function() {
alert("You clicked a paragraph");
});
});

or

Ext.onReady(function() {
var paragraphClicked = function() {
alert("You clicked a paragraph");
}
Ext.select('p').on('click', paragraphClicked);
});

Download Ext JS PDF Read All 65 Ext JS Questions
Previous QuestionNext Question
Explain what is use of Ext.onReady() function?Explain the extjs library files to include in JSP page?