在更換「SRC」 attribute.I面對的問題是新來Jquery.Need由
D:/Images/TaskList_1033_Button_Disabled.png
jQuery的編程 - SRC ATTR
<td>
<div class=Editor>
<span id=ctl02_G0_G22_G23_2_UserSelection_ECardButton_771_0_Editor class=Links disabled>
<a style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: xx-small" id=ctl02_G0_G22_G23_2_UserSelection_ECardButton_771_0_Editor_0 hotKey="0">
<img src="D:/Images/TaskList_1033_Button.png">
<span></span>
<input id=ctl02_G0_G22_G23_2_UserSelection_ECardButton_771_0_Editor_Selected_0 value=false type=hidden name=ctl02$G0$G22$G23$2_UserSelection_ECardButton_771_0$Editor$Selected_0>
</a>
</span>
</div>
</td>
更換D:/Images/TaskList_1033_Button.png
我用下面的代碼進行更換,但它不工作 腳本:
<div id="_vlv_script_">
<script type="text/javascript">
$(document).ready(function() {
var vObj = '';
$("span[id*= _UserSelection_ECardButton]").attr("Disabled", "Disabled");
vObj = $("span[id*= _UserSelection_PriorityActionButton]").children("a");
vObj.attr(img[src]).replace("src",src.replace(.png", "_Disabled.png"));
$("span[id*= _UserSelection_ECardButton]").attr("Disabled", "Disabled");
vObj = $("span[id*= _UserSelection_ECardButton]").children("a");
vObj.attr(img[src]).replace("src",src.replace(.png", "_Disabled.png"));
});
</script>
</div>
請你幫我嗎?..謝謝提前
請格式化你的代碼.. – VPK 2014-09-04 04:43:52