8808 shaares
198 private links
198 private links
About the onclick
attribute and the event
variable: onclick="submit(event)"
works. But why ?
The spec shows that the string passed to a handler is combined like this:
function $name (event) { $body }
I'm not sure what $name is but $body is the string passed to the handler attribute in HTML. event is an argument. This string becomes a function through the Function constructor I'm assuming.