Case Sensitivity Variables and function names are case sensitive. Like mismatched quotes, you already know this. But, since the error may be silent, here is the reminder. Pick a naming convention for yourself, and stick with it. And, remember that native javascript function and CSS properties in javascript are camelCase. getElementBy Id ('myId') != getElementBy ID ('myId'); // it should be "Id" not "ID" getElementById('my Id ') != getElementById('my ID '); // "Id" again does not equal"ID" document.getElementById('myId').style. Color ; // returns "undefined" Mismatching quotes, parenthesis and curly brace The best way to avoid falling into the trap of mismatched quotes, parentheses and curly brackets is to always code your opening and closing element at the same time, then step into the element to add your code. Start with: var myString = ""; //code the quotes before entering you...
A Personal blog, with different contents!
Comments
Post a Comment