想要获取到img元素的src属性值,以下写法正确的是()。
A:$("img").getAttribute("src")
B:$("img").attr("src")
C:$("img").attr("src","")
D:$("img").getAttr("src")
出自:计算机科学