这是我尝试过的:
function(nowrap) {
var cell = $(`'<td>'`);
//cell.wrap = wrap (not working)
}
最佳答案
尝试使用nowrap attribute ,
<td nowrap="nowrap">
使用CSS,这应该与div元素一起使用,不确定td
<style type="text/css"> .nowrap { white-space: nowrap; } </style> <div class="nowrap">Content here</div>
关于javascript - 如何为 td 元素设置 nowrap 属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5138324/