Is there an onload event for input elements?

后端 未结 6 709
北恋
北恋 2020-12-01 07:15

Is it possible to trigger a Javascript script, when an input element or any other html element is rendered. This script should be triggered from within the html tag, so that

6条回答
  •  醉话见心
    2020-12-01 08:19

    No, there is not. Just run your code from the document "ready" handler, or use something like jQuery to give you a way to run code at "ready" (which is when the DOM is complete but images may not have loaded).

提交回复
热议问题