請「運行代碼」後刷新一次。
關鍵就一行:alert($(".imglogo").attr("src"));。先用選擇器定位到目標 img 元素,再用 attr("src") 讀取它的 src 屬性值即可。
alert($(".imglogo").attr("src"));
attr("src")