- Wednesday, January 21, 2009, 14:56
- How-To, JavaScript
- 79,223 views
Adding Elements like textbox, button, radio button etc in a html form using JavaScript is very simple. JavaScript's document object has a method called createElement() which can be used to create html elements dynamically.
We had used this function in our tutorial:
Dynamic combobox-listbox-drop-down using javascript to add dynamic options to ...
Full story
- Tuesday, December 9, 2008, 11:27
- JavaScript
- 36,333 views
Want to populate dynamically combobox-listbox-drop-down using javascript? Let us see a very simple script to do this. First let us see createElement() of document object in javascript.
//Create a table element dynamically
var table = document.createElement("table");
//Create a select element dynamically
var select = document.createElement("select");
//Create a option element dynamically
var option = document.createElement("option");
Thus, createElement method takes a parameter which is the string that specifies the name for the element node ...
Full story