使用jQuery更改表的边框?
我有一个从Sphinx生成的表,其边框宽度为1。
我可以使用jQuery / javascript将边框宽度更改为0吗?
是的你可以。 你想使用像这样的attr()函数 ……
$('table.docutils').attr('border', '0');
我倾向于使用.css()
函数而不是.attr()
…例如:
$("table.docutils").css('border', 'none');
🙂
使用
document.getElementById('myTable').border="0"