<script>
var buttons=document.getElementsByTagName("button")
for(var i=0;i<buttons.length;i++){
buttons[i].onclick=function(e){
var elem=document.getElementById("fruittext");
if(e.target.innerHTML=="Outline Off"){
elem.style.outline="none"
}
else{
elem.style.outlineColor="red";
elem.style.outlineStyle="solid";
elem.style.outlineWidth="thick";
}
};
}
</script>
我看不太懂,能不能详细的讲解一下
相关分类