Insert a cell with javascript and then insert checkboxes into it? -
i want create table javascript, , in of cells, put in radiobuttons , checkboxes javascript. found code:
function insrow() { var x = document.getelementbyid('mytable').insertrow(0); var y = x.insertcell(0); y.setattribute('id', "newdiv"); }
(the last line (setattribute
) line added. thought give new table cell id, , use document.getelementbyid
id in various subroutines. not work. maybe making global variable store copy of 'y' in work - use in routines. shouldn't above code work?
the document.getelementbyid
method (lowercase "g"
, "d"
) work once element added dom.
ultimately, if possible, manipulations y
variable, before it's appended, accessible id other element.
Comments
Post a Comment