How to get Events associated with DOM elements?

后端 未结 4 2231
遥遥无期
遥遥无期 2021-02-14 02:27

I have an HTML document.
It is possible to get the events associated with every Element in a particular FORM element in the document using javascrip

4条回答
  •  太阳男子
    2021-02-14 03:01

    Though It looks weird to answer my own question but may be it will help some one :

    I did some research and found that: document.forms[i].elements[j].onclick will return

    function onclick()
    {
        login()
    }
    

    Here is the method which I was calling onClick of the button
    similarly we can check many others like:

    document.forms[i].elements[j].onblur
    document.forms[i].elements[j].onfocus etc. etc.



    Many thanks to all for taking interest in this question.

提交回复
热议问题