I have created a set of dynamic elements during run time. How do I define and declare functions for them beforehand?
i.e. I will be creating a set of 25 buttons during execution, and assigning various attribute values to each one of them.
How do I, say, add onclick events for such elements, i.e. buttons?
Declaring and defining them before ‘compiling’ them, would result in error? Won’t it?
Try this :
or create a method for the click event :
you can do this for any even not just the
Clickone.