Code: Select all
function add_element() { new_color = document.createElement('color'+custom_color); new_color.setAttribute('id', 'stylesheet'); //new_color.setAttribute('tabindex=\"3\"', 'stylesheet'); new_color.innerHTML = 'Im over here!'; my_div = document.getElementById('add_here'); document.getElementById('add_here').insertBefore(new_color, my_div);}Code: Select all
<div id="add_here" style="clear: left; float: left; margin: 4px;"><a id="colortransparent" href="javascript: anchor();" tabindex="3"></a></div>