Alp*_*n67 0 html javascript css
为什么这不起作用?在Firebug中,当我点击按钮时,它总是告诉我cambiaBandiera没有定义...
救命
亚历克斯
#ITA{
float:right;
margin : 5px 85px;
width:40px;
height:40px;
background : #FFFFFF url("../ITA_off.png") center center no-repeat;
border:0;
}
Run Code Online (Sandbox Code Playgroud)
<style type="text/javascript">
function cambiaBandiera() {
test=document.getElementById("ITA");
test.style.backgroundImage="url('../ITA_on.png')";
}
</style>
Run Code Online (Sandbox Code Playgroud)
<div id="bandiere">
<input type="button" id="ITA" onClick="cambiaBandiera()"> </input>
</div>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10959 次 |
| 最近记录: |