Mega Code Archive

 
Categories / JavaScript Reference / Javascript Methods
 

InsertAdjacentText() Example

<html> <body> <script language="JavaScript"> function function1() {    var myText = 'Some Sample Text';    document.all.myDiv.insertAdjacentText('afterBegin', myText);  }  </script> <button onclick="function1();">Insert element</button> <div id="myDiv" style="width:300; height:200;"></div> </body> </html>