English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories


Hi There

Bob says

and goodbye.

2007-10-16 05:58:30 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers

The makes the contents a comment. Remove those lines and it'll work.

2007-10-16 06:05:29 · answer #1 · answered by Anonymous · 0 0

I would advise against using document.write(). It's difficult to tell when this writes to the whole document or only to the end of a document or wherever, I'm not sure about the rules. Instead, use innerHTML. Like this:



Hi There



Bob says and goodbye.



Then just activate the function sayhi() using something like an onPageLoad or onMouseover on the body tag or a timer. I inserted spaces into the line in the function because Yahoo Answers truncates text that goes for too long without spaces, just get rid of those spaces to make it work (save for the one in 'Hi there' of course).

2007-10-16 13:09:21 · answer #2 · answered by Anonymous · 1 0

javascript should be in a seperate file:

in html is this:




Bob Says






js file is this:
document.write("Hi there");

just remember to put the extention js via text file

2007-10-16 13:12:25 · answer #3 · answered by titchyc 2 · 0 0

It is a funny thing this problem
and the answer is in this line
This line should consist of a less than symbol, an exclamation mark and then 2 minus signs like this