Friday, January 2, 2009

Javascript: Your Browser Isn't Psychic

To start, the book says get used to putting JavaScript directly into an HTML page.

Let your browser know you're using JavaScript by putting the...
< script type="text/javascript" >
after < /title > in the head. Close it with a < /script >

One thing I really like about the Head Start book is that it has a section called "There are no dumb questions." Basically, they try to guess all of your questions and answer them after reading through a page/section. One interesting learning from this section on page 11 is that the < script > tag doesn't tell the browser you're going to input in JavaScript, it just says "hey there's script coming." You have to include the type="text/javascript" so your browser goes - "here comes JavaScript!"

No comments:

Post a Comment