I have heard many times that using JavaScript events, such as onClick()
, in HTML is a bad practice, because it\'s not good for semantics. I would like to know w
Your question will trigger discussion I suppose. The general idea is that it's good to separate behavior and structure. Furthermore, afaik, an inline click handler has to be eval
led to 'become' a real javascript function. And it's pretty old fashioned, allbeit that that's a pretty shaky argument. Ah, well, read some about it @quirksmode.org