I have created a table using javascript . Here is the code
var table = document.createElement('TABLE');
table.border='1';
var tableBody = document.createElement('TBODY');
table.appendChild(tableBody);
var tr = document.createElement('TR');
var td = document.createElement('TD');
newString = td.appendChild(document.createTextNode(newString));
tr.appendChild(td);
How do i change the font size of the cell contents ? ie i want newString to be displayed in Font size 20.
Add
td.style.fontSize = '20px';
After
var td = document.createElement('TD');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.