<script type="text/javascript" src="http://www.cnblogs.com/0banana0/admin/”http:/ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”"></script><script type="text/javascript">// <![CDATA[$(function(){ $("#id").click(function() { $(this).css({ width: function(index, value) { alert(value); return parseFloat(value) * 1.2; }, height: function(index, value) { alert(value); return parseFloat(value) * 1.2; } }); });});// ]]></script><div id="id" style="background: Red; width: 50px; heigth: 50px;">sa</div>
效果 点击红色的层