这是我的代码:
<h3 class="ms-standardheader">
<nobr>
Reasons for proposals selected and not selected
</nobr>
</h3>
这是我的图片:
但是我的文字太大,我想插入 <br>
跳过一行,如下所示:
可能吗?
最佳答案
一种方法:
$('nobr').html(function () {
return $(this).html().replace('selected and', 'selected<br />and');
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<h3 class="ms-standardheader">
<nobr>
Reasons for proposals selected and not selected
</nobr>
</h3>
关于javascript - 如何跳线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26040609/