<body> <div class="arr"> <img src="arr-down.png" > </div> <script src="js/jquery.js"></script> <script> var $arr = $(‘.arr‘); var target = false; $arr.click(function () { target = !target; if (target) { $arr.find(‘img‘).attr(‘src‘, ‘arr-up.png‘); } else { $arr.find(‘img‘).attr(‘src‘, ‘arr-down.png‘); } }); </script> </body>
原文:http://www.cnblogs.com/jiaoyue/p/7384600.html