我有一张图片,上面写着“添加到购物车”,当它被点击时,jQuery 会显示一个 div,说明已成功添加到购物车。问题是,因为我需要它作为图片滚动的链接才能工作,所以单击时它链接到页面顶部(
<div class="producttext"> Body Snatcher <!-- product name text --> <div class="pricetag"><img src="pricetags/1499.png" width="113" height="150" /> </div></div> <!-- pricetag, ending both the pricetag and text div -->
<div class="addtocart"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('cart','','cart-rollover.png',1)"><img onclick="document.getElementById('addedcartbg').style.display = 'block'" src="cart.png" width="200" height="80" id="cart" /></a> <br /></div>