我不知道爲什麼下面的代碼在IE中能正常工作,但不是Firefox(3.6.15)?jquery.bind的圖像onclick不工作在Firefox?
HTML:
<input type="image" name="btbuy1" id="btbuy1" src="img/buy.gif" disabled="disabled"/>
的JavaScript:
EnableBuyButton(btbuy1);
function EnableBuyButton(ABtnId)
{
var btElement = document.getElementById(ABtnId);
btElement.setAttribute("disabled", "");
$('#' + ABtnId).bind('click', function()
{
alert('User clicked buy btn');
});
}