<html>
<head></head>
<body>
<div id="tree">
<div>node</div>
<div>node</div>
<div>node</div>...
</div>
<script type="text/javascript">
var elems = document.getElementById("tree").getElementsByTagName("div");
var num = elems.length;
for(var i=0; i<num; i++) {
plus = document.createElement('span');
plus.innerHTML = '+';
elems[i].parentNode.insertBefore(plus,elems[i]);
}
</script>
</body>
</html