view.aspx
<img src ="~/UserControls/Vote/Images/Arrow Up.png" id = "voteupoff"
runat = "server" alt ="vote up"
class="voteupImage" style="height: 45px; width: 45px"/>
我想改变它src~ / UserControls / Vote / Images / aftervoteupArrowUp.png点击图片时我的意思
view.js
$('img.voteupImage').live('click', function() {
$('img.voteupImage').attr('src', aftervoteUp);
}
but it's not working..
答案 0 :(得分:5)
$('img.voteupImage').live('click', function() {
$(this).attr('src', aftervoteUp);
});