Changing the border with of a table with jQuery?
I have a table generated from Sphinx that has a border of width 1.
&l开发者_运维百科t;table border="1" class="docutils">
Can I change the border width to 0 using jQuery/javascript?
Yes you can. You want to use the attr() function like this...
$('table.docutils').attr('border', '0');
I would tend to use the .css()
function as opposed to .attr()
... eg:
$("table.docutils").css('border', 'none');
:)
use
document.getElementById('myTable').border="0"
<table border="1" class="docutils" id="myTable">
精彩评论