V
vinayak
Is there any way to convert a html element like <div> to a table,
using javascript and/or css?
Here is example that I need to work on:
I have a div in a page like:
<div id="myDiv">some text</div>
Now in script, i need to do followings:
var t = document.getElementById("myDiv");
var r = t.insertRow(0);
.......
The insertRow() function is not defined for object t (because it is a
div element).
If it had been a table, it would not had been a problem.
I need to convert the div (or can be other tags) to the table.
using javascript and/or css?
Here is example that I need to work on:
I have a div in a page like:
<div id="myDiv">some text</div>
Now in script, i need to do followings:
var t = document.getElementById("myDiv");
var r = t.insertRow(0);
.......
The insertRow() function is not defined for object t (because it is a
div element).
If it had been a table, it would not had been a problem.
I need to convert the div (or can be other tags) to the table.