javascript Programming Glossary: add_the_handlers
Line by Line explanation of “Javascript: Good Parts” example? http://stackoverflow.com/questions/2947749/line-by-line-explanation-of-javascript-good-parts-example But it always displays the number of nodes instead. var add_the_handlers function nodes var i for i 0 i nodes.length i 1 nodes i .onclick.. nodes i .onclick function e alert i END BAD EXAMPLE The add_the_handlers function was intended to give each handler a unique number i.. an alert box will display the ordinal of the node. var add_the_handlers function nodes var i for i 0 i nodes.length i 1 nodes i .onclick..
|