<td><nobr></nobr></td>

解决方案 »

  1.   

    这不是我想要的,这与我上面说的方法没什么两样呀!依然要插入2000个元素!如果我在htc里面加上这个别人不是要用tbUniqeID.rows[i].cells[j].children[0]才能访问到原来tbUniqeID.rows[i].cells[j]的内容?
      

  2.   

    Care should be taken when the noWrap property is used in conjunction with the width attribute of table or td elements.Wordwrap still occurs in a td element that has its WIDTH attribute set to a value smaller than the unwrapped content of the cell, even if the noWrap property is set to true. Therefore, the WIDTH attribute takes precedence over the noWrap property in this scenario.If a td element has its noWrap set to true and the WIDTH attribute of its table element is set to a smaller dimension than the rendered content of the td element, wordwrap does not occur. In this case, the noWrap setting takes precedence over the WIDTH attribute.
    因此你的 td 不能设置宽度
    如果你在做datagrid效果 可以设置table.style.tableLayout="fixed"
      

  3.   

    <table style="word-break:break-all">
      

  4.   

    我是希望它不自动换行!!
    如果<table style="word-break:keep-all">如果两个单词间有空格,单元格内容还是自动换行了,难道真的只有在TD里加上<span nowrap>之类了吗?
      

  5.   

    table.style.tableLayout="fixed"
    table.style.workBreak="keep-all"
    已设!!