[an error occurred while processing this directive]
javascript tutorial graphic


Webteacher Software now offers

//Define contents of page
contents=
'<body bgcolor="beige">'+
'<h2>Hello</h2>'+
'Click on the message below to close this window<br>'+
'<A HREF="javascript:window.close()" >'+
message +
'</A>'


Creating long strings of text

I can use the plus sign (+) to add text and variables together into one long piece of text. For example:

The command
result = "Hello " + "world"
Will cause result to equal Hello world

You can use the same technique to combine text with variables, like this.

mytext = prompt("what is your favorite color","")
result = "Your favorite color is " + mytext

result =

Next Page

Home | WebData - Web Database Software | Javascript | CGI | Consulting | Map Builder | Contact Us | The Press Room