开发者

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">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜