当前位置: 代码迷 >> Web前端 >> Jquery中的resize步骤
  详细解决方案

Jquery中的resize步骤

热度:104   发布时间:2012-11-01 11:11:32.0
Jquery中的resize方法
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd
">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="http://code.jquery.com/jquery-latest.js
"></script>
<script language="javascript">
$(document).ready(function(){
 $(window).resize(function() {
    $('#log').append('<div>Handler for .resize() called. Window widthis ' + $(window).width() + '</div>');
 });
});
</script>
</head>
<body>
<div id="log">请缩小或放大窗口。</div>
</body>
</html> 
  相关解决方案