我找不到如何将事件绑定到ext.js中的几个元素,也没有找到初始化页面上所有元素后触发的任何特定事件,所以我想问如何将事件绑定到页面上的几个元素或触发它页面上的所有组件都会被初始化。
in the load event of the body just attach the event what ever it is to what ever elements
Example Java Script
window.onload = function()
{
var Elements = document.getElementsByTagName('INPUT');
for(var i =0;i<Elements.length;i++)
{
Elements[i].onclick = function(e)
{
//do what you want to do here to be handled on the onclick event
}
}
}
Regards i am here for any comments
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.