-1
请查看我的代码。我尝试了很多,但我找不到问题。我如何防止将来出现这样的错误?获取'无法读取null属性样式'
<script>
var tbox= document.getElementById('tbox');
var selector= document.getElementById('selector');
function change(tothis){
tbox.style.color=tothis;
}
function appear(){
selector.style.visibility='visible';
tbox.focus();
}
function disappear(){
selector.style.visibility='hidden';
}
setTimeout(disappear,500);
</script>
看起来像元素不存在 – 2015-03-25 10:21:23