js中為什么有的事件得不到處理?
?function changecolor()
? ?{
? ? ? ?var swipe=document.getElementById("txt");
? ? ? ?swipe.style.color="red";
? ? ? ?swipe.style.backgroundColor="gray";
? ?}
?function hidden()
? ?{
? ? ? ?var swipe=document.getElementById("txt");
? ? ? ?swipe.style.display="none";
? ?}
為什么下面隱藏函數得不到事件的響應呢?
2015-07-23
換了,依然沒用...
2015-07-23
hidden是js的關鍵字,取函數名不要用js的關鍵字。大爺,換個函數名唄。