[an error occurred while processing this directive]
contents=
'<body bgcolor="beige">'+
'<h2>Hello</h2>'+
'Click on the message below to close this window<br>'+
'<A HREF="javascript:window.close()" >'+
message +
'</A>'
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 |
Next Page |