HTML:
<a id="Change">Click to change</a>
<a href="image1_big.png" class="maneA blade">
<img id="maneP" src="image1.png"/></a>
Javascript:
<script>
$(function() {
$('#Change').click(function(){
$("#maneP").attr('src',"image2.png");
$(".maneA").attr('href',"image2_big.png");
return false;
});
});
</script>
为什么href
属性不变?什么时候src
?!