ph_Rodrigues
06-08-2006, 06:58 PM
Good night friends!
I'm trying to create a dinamic table.
The code that i'm using is:
<html>
<body>
<script language="JavaScript">
function tmp()
{
var newTable = document.createElement("table");
var newTr = document.createElement("tr");
var newTd = document.createElement("td");
newTd.innerHTML = "tmp";
newTr.appendChild( newTd );
newTable.appendChild( newTr );
document.body.appendChild( newTable );
}
</script>
<input type="button" onClick="tmp()" value="Click">
</body>
</html>
The problem is: when i click on 'Click' anyone action is happening... Somebody know what's happening??
Thanks for the attention! ;)
I'm trying to create a dinamic table.
The code that i'm using is:
<html>
<body>
<script language="JavaScript">
function tmp()
{
var newTable = document.createElement("table");
var newTr = document.createElement("tr");
var newTd = document.createElement("td");
newTd.innerHTML = "tmp";
newTr.appendChild( newTd );
newTable.appendChild( newTr );
document.body.appendChild( newTable );
}
</script>
<input type="button" onClick="tmp()" value="Click">
</body>
</html>
The problem is: when i click on 'Click' anyone action is happening... Somebody know what's happening??
Thanks for the attention! ;)