No much to say,
The alert message is null
instead of a message contain details of the object or something like that.
What is the problem?
Answer
Put your script AFTER the actual element, otherwise by the time your javascript code runs, there's not yet such element in the DOM.
Alternatively put your script in a DOM ready event to ensure that the DOM is fully loaded by the browser before attempting to manipulate it:
No comments:
Post a Comment