Created
September 15, 2009 21:26
-
-
Save kodi/187658 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
table{ | |
border-collapse:collapse; | |
} | |
table td{ | |
border:solid 1px #cacaca; | |
} | |
</style> | |
<script type="text/javascript"> | |
function generateTable(rows,columns,container){ | |
var HTML='<table>'; | |
for(var i=0;i<rows;i++){ | |
HTML+='<tr>'; | |
for(var j=0;j<columns;j++){ | |
HTML+='<td>Colum: '+j+' Row:'+i+' </td>'; | |
} | |
HTML+='<tr>'; | |
} | |
HTML+='</table>'; | |
document.getElementById(container).innerHTML=HTML; | |
} | |
window.onload=function(){ | |
generateTable(4,4,'result'); | |
} | |
</script> | |
</head> | |
<body> | |
<div id="result"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment