-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