[Dojo-interest] How to add a dom node into html pag by Dojo?

hawk gao gaohawk at gmail.com
Wed Aug 20 08:29:26 UTC 2008


I got it. Thank you all.

2008/8/20 Peter Svensson <psvensson at gmail.com>

> Yes;
>
> var foo = dojo.byId('foo');
> var bar = dojo.doc.createElement('div');  // dojo.doc is the current
> document.
> foo.appendChild(bar);
>
> If you want you can check out the Dojo APi online, for (quite a lot) of
> other goodies;
>
> http://api.dojotoolkit.org/
>
> Also see if the Dojo book has somehting you can use;
>
> http://dojotoolkit.org/book/dojo-book-1-0
>
> This chapter touches on some of the thigns you'd want to read, for exmple;
>
>
> http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-dojo/functions-used-everywhere
>
> Cheers,
> PS
>
>
> On Wed, Aug 20, 2008 at 10:17 AM, hawk gao <gaohawk at gmail.com> wrote:
>
>> as you said, I need to create a node by document.createNode(), then
>> appendChild it to a parent node. right?
>>
>> 2008/8/20 Peter Svensson <psvensson at gmail.com>
>>
>> If you have the DOM node, you'll just use its usual functions, like
>>> appendChild(x), et.c.  Dojo does not (actually does explicitly not) extend
>>> the DOM in any manner.
>>>
>>> Cheers,
>>> PS
>>>
>>> On Wed, Aug 20, 2008 at 10:04 AM, hawk gao <gaohawk at gmail.com> wrote:
>>>
>>>>  Hi, all,
>>>> I'm new in Dojo. I only found dojo.byId() to get node, but didn't find
>>>> any way to add node.
>>>> Thanks
>>>> Hawk
>>>>
>>>> _______________________________________________
>>>> FAQ: http://dojotoolkit.org/support/faq
>>>> Book: http://dojotoolkit.org/docs/book
>>>> Forums: http://dojotoolkit.org/forum
>>>> Dojo-interest at dojotoolkit.org<http://dojotoolkit.org/forumDojo-interest@dojotoolkit.org>
>>>> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>>>
>>>>
>>>
>>> _______________________________________________
>>> FAQ: http://dojotoolkit.org/support/faq
>>> Book: http://dojotoolkit.org/docs/book
>>> Forums: http://dojotoolkit.org/forum
>>> Dojo-interest at dojotoolkit.org<http://dojotoolkit.org/forumDojo-interest@dojotoolkit.org>
>>> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>>
>>>
>>
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://dojotoolkit.org/docs/book
>> Forums: http://dojotoolkit.org/forum
>> Dojo-interest at dojotoolkit.org<http://dojotoolkit.org/forumDojo-interest@dojotoolkit.org>
>> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at dojotoolkit.org<http://dojotoolkit.org/forumDojo-interest@dojotoolkit.org>
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://turtle.dojotoolkit.org/pipermail/dojo-interest/attachments/20080820/d5927ba8/attachment.html 


More information about the Dojo-interest mailing list