2015-02-01 03:21:54 +00:00
|
|
|
|
2015-01-23 13:09:30 +00:00
|
|
|
Vn.Node =
|
|
|
|
{
|
|
|
|
removeChilds: function (node)
|
|
|
|
{
|
|
|
|
var childs = node.childNodes;
|
|
|
|
|
|
|
|
while (childs.length > 0)
|
|
|
|
node.removeChild (childs[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
,remove: function (node)
|
|
|
|
{
|
|
|
|
node.parentNode.removeChild (node);
|
|
|
|
}
|
|
|
|
|
|
|
|
,setText: function (node, text)
|
|
|
|
{
|
|
|
|
Vn.Node.removeChilds (node);
|
|
|
|
|
|
|
|
if (text)
|
|
|
|
node.appendChild (document.createTextNode (text));
|
|
|
|
}
|
|
|
|
};
|
2015-02-01 03:21:54 +00:00
|
|
|
|
|
|
|
function $ (id)
|
|
|
|
{
|
|
|
|
return document.getElementById (id);
|
|
|
|
}
|