Jump to content

creating a table in javascript


bluey83
 Share

Recommended Posts

I want to make a table in JavaScript but have no idea where to start. From what I have seen on this forum other people have created a function and then inserted normal HTML inside it. Is that how I go about doing it? The script for this table is going to be passed into a VRML file instead of a regular html page. Thanks

Link to comment
Share on other sites

Like this?

<body><script>document.write('<table border="1">');document.write('<tr><td>hello</td></tr>');document.write('<tr><td>hello Again</td></tr>');document.write('</table>');</script></body>

Link to comment
Share on other sites

Like this?
<body><script>document.write('<table border="1">');document.write('<tr><td>hello</td></tr>');document.write('<tr><td>hello Again</td></tr>');document.write('</table>');</script></body>

If that's how you write a table then yeah. In VRML when you pass in jscript you need event in's and fields so I think it would need to be written in a function to make it viable. Is that the format though for writing a table in JavaScript?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...