<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>//<![CDATA[
window.onload=function(){
var c = document.getElementById('test');
alert('w: ' + c.width + ' h: ' + c.height);
}//]]>
</script>
</head>
<body>
<canvas id="test"></test>
</body>
</html>