这样可以
<div id="alf" onmouseover="document.getElementById('alf').style.width='200px';
document.getElementById('alf').style.height='200px';
document.getElementById('alf').style.background = 'green';" onmouseout="document.getElementById('alf').style.width='20px';
document.getElementById('alf').style.height='20px';
document.getElementById('alf').style.background = 'red';">
wo
</div>
//
<input type="checkbox" onmouseover="div1.style.display = 'block';" onmouseout="div1.style.display='none';"/>
这样不行。 不懂
<script>
function toGreen(){
document.getElementById("alf").style.width=300px;
document.getElementById("alf').style.height=300px;
document.getElementById("alf").style.background = green;
}
//
function callIt(a){
var element = document.getElementById("div1");
if(a==1){
element.style.display = "block";
}else{
element.style.display = "none";
}
}
</script>
<input type="checkbox" onmouseover="callIt(1)" onmouseout="callIt(0)"/>
//
<div id="alf" onmouseover="toGreen()" onmouseout="toGreen()">wo
</div>
sublime 解决 中文 乱码
逐个 调文件, woqu
在Sublime Text 中,File-->Save with Encoding-->UTF-8 with BOM