<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
function zoom(){
var testcanvas = document.getElementById("canvas");
testcanvas.width *=1.25;
testcanvas.height *= 1.25;
}
</script>
<input type="button" value="zoom" onClick="zoom()" />
<div class="main">
<canvas id="canvas" style="background: #ff0000;"></canvas>
</div>
</body>
</html>