<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>
chandou
相关分类