将字符串结果返回到表单元格中的新行中

Returning string result into a new line in a table cell

本文关键字:单元格 新行中 表单 字符串 结果 返回      更新时间:2024-04-21

我有这些数据,我需要在同一单元格内将其拆分为3行。

 var Ms = '<tr>'
    Ms += '<td>' + 'Where' + ''n'r' + 'are' + ''n'r' + 'you' + '</td>';
    Ms += '</tr>'

我试过了,但似乎不起作用。我需要以下格式的结果:哪里是您的

为什么不使用<br>

 var Ms = '<tr>'
    Ms += '<td>' + 'Where' + '<br>' + 'are' + '<br>' + 'you' + '</td>';
    Ms += '</tr>'