<script type="text/javascript"> (function(window){ if(window){ window.onload = function(){ //获取canvas var canvas = document.getElementById('canvas'); //获取画布 var content = canvas.getContext('2d'); var cw,ch; function Dot(){ }; (function(){ window.onresize = arguments.callee; //接收一个指向自己的函数,在事件触发的时候执行 console.log(arguments.callee) cw = innerWidth; ch = innerHeight; canvas.width = cw; canvas.height = ch; })(); } } })(window)</script>
添加回答
举报
0/150
提交
取消