On 01/05/10 10:06, Ben Stover wrote:
> var x = document.createElement("hello"); 

There is no HTML tag named "hello" so this is almost certainly not going 
to do what you want.

> var x = document.createElement("<P>"); 
> var x = document.createElement("<br>"); 

Similarly, there are no tags named "<p>" or "<br>".  (There _are_ tags 
named "p" and "br".  You don't pass angle brackets to createElement.)

> var x = document.createElement("&nbps;");

Even if it was spelled right, again, there is no element called "&nbsp;".

> Is there a mass adding command?

There is innerHTML.  There are also a variety of scripts that will 
accept a more convenient input, and do all the createElement (and other) 
calls for you.  I once wrote this one, useful in this context because it 
is small and self contained (not part of a larger library):

http://programming.arantius.com/dollar-e

--

You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.


Reply via email to