I have a div tag, lets say "mydivTag"
It has a child node under it with an ID of "childID"
I want to delete/unregister/whatever "childID" and then recreate a different node with the same ID, "childID"
How do I achieve r开发者_如何学编程emoval of the first object with ID "childID" so that when I make my new object with that same ID, I don't get an error about there already being a widget registered with the ID "childID"
Thanks
have you tried something like
dojo.query("#childID", mydivTag).orphan()
then
dojo.create("div", {id: "childID"}, mydivTag)
These are just shorthand for DOM APIs like removeChild
and createElement
精彩评论