2012-09-08 21 views

回答

1
$("#footer > img").attr("src", "http://site.com/" + $("#footer > img").attr("src")); 

或者,你可以嘗試檢查出base標籤:

<head> 
    <base href="http://www.w3schools.com/images/" target="_blank" /> 
</head> 

<body> 
    <img src="stickman.gif" /> 
    <a href="http://www.w3schools.com">W3Schools</a> 
</body> 
+0

他們想改變IMG的src頁腳,而不是頁腳 –

+0

它這裏$ ok..edit( 「#footer img」)。attr(「src」,「http://site.com/」+ $(「#footer img」)。attr(「src」));謝謝... –

相關問題