hey folks,
i m trying to create a loop which is going good and printing in a table. but i want to print it all in just one row.(horizontal) for now this is my code
<html>
<head>
<title>For:Loop</title>
</head>
<body>
<script type="text/javascript">
var i = 0;
for (i=0;i<=10;i++){
document.write("<table width=50 border=1><tr><td>" +i+ "</td><tr></table>")
}
</script>
</body>
</html>
wel for wht i can see is u have re declare variable from <table><tr> to </tr></table>. but when i name it any other variable. say i make newhtml to n or t. it doesn’t work.
Edit: i was able to fix it. i was printing the old newhtml doc. sorry my bad.
thanks though!