我有这个代码在Chrome和Firefox中运行良好,但在IE上只显示第二个背景图像......你知道为什么吗?
$('input[type=button]').click(function() {
//search for the button
var button = document.getElementsByName("contactme");
//change the image
button[0].style.background = "url(http://www.restorationsos.com/imgs/loader.gif) no-repeat, url('http://www.restorationsos.com/imgs/btnBG.gif') repeat-x";
//change the text
button[0].value = "We Are Connecting You...";
button[0].style.textAlign = "right";
button[0].style.color = "#ea2400";
//disable the button
button[0].disabled = true;
});
答案 0 :(得分:2)
答案 1 :(得分:0)
尝试添加css属性
zoom:1;在IE7中,这会使背景图像神奇地出现。不要问我原因,只是这样。