开发者

Changing the border with of a table with jQuery?

开发者 https://www.devze.com 2023-01-31 13:28 出处:网络
I have a table generated from Sphinx that has a border of width 1. &l开发者_运维百科t;table border=\"1\" class=\"docutils\">

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

精彩评论

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