Friday, 15 April 2011

javascript - Why Can't I Use JS Function Called 'evaluate' in HTML? -



javascript - Why Can't I Use JS Function Called 'evaluate' in HTML? -

i'm kind of curious why doesn't work

javascript:

function evaluate(){ console.log(42); }

html:

<a onclick="evaluate()">click me!</a>

is evaluate reserved keyword somewhere on html side?

document.evaluate needed parsing xmls, see the reference in mdn here.

javascript html

No comments:

Post a Comment