87,992
社区成员
发帖
与我相关
我的任务
分享function luger_resize() {
。。。。。
}
$(window).resize(luger_resize());$(window).resize(RefreshSize);
$(canvas).mousedown(UIOnMouseDown);
$(canvas).mousemove(UIOnMouseMove);
$(canvas).mouseup(UIOnMouseUp);
$(edit).blur(UpdateLable);
$(edit).keypress(AutoGrow);
传递的是个函数名,而不是返回值,切记!
当然,如果函数非常简单可以原地写,那就用匿名函数也不错。<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
function luger_resize() {
alert("卧槽,窗体大小变了呀!");
}
$(window).resize(
function(){
luger_resize();
}
);
</script>
</head>
<body>
<div id="divM" style="width:100%;height:900px;" >
</div>
</body>
</html>