Asked by duncanb7
at 2024-04-10 16:05:25
Point:500 Replies:9 POST_ID:828468USER_ID:11059
Topic:
JavaScript;;Hypertext Markup Language (HTML)
I just finish to extract csv data into two different location table by javascript with
getelementsByTagName("div")(k).
Now I would like to ask whether it is possible I can set different width of every column for different tables
If I use style table or td {} , it will update all column width globally, in other words, all column width is same
and fixed. If I go into for loop in javascript, it do update for each cell's width that will costs a lot of loop
time and huge if the table is 1000*20.
Any suggest for set different column width (for exmaple no of column is 20) by javascript or html or others ?
And table in table method and do update for each cell is final approach but I don't want to do so.
Second question how to set different table border if two tables in one html
Can I set like this
<style type="text/css">
table.[0]
{ border:3px}
table.[1]
{border:6px}
</sytle>
Please advise for two questions
Duncan
getelementsByTagName("div")(k).
Now I would like to ask whether it is possible I can set different width of every column for different tables
If I use style table or td {} , it will update all column width globally, in other words, all column width is same
and fixed. If I go into for loop in javascript, it do update for each cell's width that will costs a lot of loop
time and huge if the table is 1000*20.
Any suggest for set different column width (for exmaple no of column is 20) by javascript or html or others ?
And table in table method and do update for each cell is final approach but I don't want to do so.
Second question how to set different table border if two tables in one html
Can I set like this
<style type="text/css">
table.[0]
{ border:3px}
table.[1]
{border:6px}
</sytle>
Please advise for two questions
Duncan
Attachment:Book7.csvpostcodes.csv