img你设定的是id选择器,而id选择器是唯一的,所以不应该使用下标,应该是: $("#img").src = "Image/3.jpg";
$('#img').attr('src','Image/3.jpg');试试这个
$('#img').attr('src','Image/3.jpg');