javascript - 如何强制换行
问题描述
嗨,我正在尝试在 message 和 hideemail() 之间强制换行
以下不起作用
document.write(message);document.write /n; hideemail();
我最好或最简单的方法是什么
解决方案
正如 Vitalii 指出的那样,您需要使用 html 标签等价\n
物br
document.write('ffff');
document.write('<br>');
document.write('dddd');
document.write('xxxx');
推荐阅读
- reactjs - 无法编译模块解析失败:导入或访问docx文件reactjs时出现意外字符
- android - 无法使用 Firebase 显示我的目标列表
- intellij-idea - 如何从 Intellij 的 Find In Path 结果中排除 import 和 package 语句?
- data-structures - 如何确定布谷鸟过滤器的尺寸?
- javascript - 检查变量是真还是假
- c# - 单击其中一个时如何禁用两个提交按钮
- python - 线性回归 Theta 参数趋于无穷大
- php - 需要将旧帖子元值与新帖子元值进行比较
- oracle - 我们如何将oracle 1521端口转移到另一台机器的9800端口
- azure - 如何使用 SpringBoot 应用程序使用 Azure Functions 安排 Cosmos DB 数据处理