51help TIY
码:
<html> <head> <script type="text/javascript" src="../jquery/jquery.js" tppabs="http://www.51help.tk/jquery/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("div").click(function() { $(this).css( "width", function(index, value) {return parseFloat(value) * 1.2;} ); }); }); </script> <style> div {width:100px; height:50px; background-color:red;} </style> </head> <body> <div></div> </body> </html>
查看结果: