<canvas id="canvas"></canvas>
<script type="text/javascript">
console.log(canvas.offsetWidth,canvas.offsetHeight);
</script>
<canvas id="canvas"></canvas>
<script type="text/javascript">
console.log(canvas.offsetWidth,canvas.offsetHeight);
</script>