All that I know is by trying to write scripts, but beforehand, I picked up the basics from these two links:
http://www.w3schools.com/dhtml/default.asphttp://www.w3schools.com/htmldom/default.asp
Work through those and you\'ll be an expert!