August 20, 2009

Javascript 17: Objects

Start off with an HTML script

<script type=""text/javascript">
function book(harrypotter,lordflies,chocolatewar)

var book= new book ("harry potter","sowhead","trinityschool");


<script type=""text/javascript">
document.write("the book that i like the most is "+book.harrypotter);


This is going to display a text string with the sentence "the book that I like the most is " and then harry potter because that is what I defined with the variable.

, , ,

Powered by ScribeFire.

No comments:

Post a Comment