我的这段代码在 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;
});
直播:http://jsfiddle.net/cristiboariu/pUeue/21/
我是一名优秀的程序员,十分优秀!