Javascript Error Missing Name After . Operator On Variable Function
I need to fix this javascript error I am having 'missing name after . operator on variable'. This is my current code I am trying to get working.
Solution 1:
Use either dot or bracket notation, not both:
elem[i][actionIn] = function(){this.style.background='red';}
elem[i][actionOut] = function(){this.style.background='';}
Solution 2:
You do not need a .
between the two square bracket pairs.
elem[i][actionIn]
and elem[i][actionOut]
should suffice.
Post a Comment for "Javascript Error Missing Name After . Operator On Variable Function"