Published: 2013-05-16 21:02:32
May 16, 2013 14:02||This is my demo for Jason.
May 16, 2013 14:02||This is my demo for Jason.
The new HTML5 CANVAS Element is where your Game with "strut its stuff".
But the CANVAS live within a standard HTML Web Page.
This lesson just shows you how to get a CANVAS onto a Web Page. The magic about what to do in the CANVAS will come later.
element = document.getElementById(id);
element
is a reference to an Element object, or null if an element with the specified ID is not in the document.
id
is a case-sensitive string representing the unique ID of the element being sought.
Return Value
Returns an object of type DOM Node.
An element that matches the specified ID. If there are multiple matches, the first is returned.