Javascript examples for DOM HTML Element:Label
Placing the produced <label> element
<html> <head> <script language="javascript"> function addSomeText()/*from w w w . ja va 2 s . c o m*/ { var dynaspan = "<label>"+new Date().getTime()+"</label>" document.getElementById("clickable").innerHTML += dynaspan; } </script> </head> <body> <div style="width:auto;height:240px;border:1px solid red;" contenteditable="true" id="clickable"> </div> <button onclick="javascript:addSomeText();">Say Something!</button> </body> </html>