html - 如何在网站上的 WhatsApp 共享段落后添加中断?

标签 html share whatsapp

我正在尝试通过网站上的 Share on WhatsApp 提供以下输出:

This is a sentence. 
This is another sentence.

使用以下代码:

<a href="whatsapp://send?text=This is a sentence. 
This is another sentence." data-action="share/whatsapp/share">Share on WhatsApp</a>

但它给出的输出为:

This is a sentence. This is another sentence.

如何获取?

最佳答案

尝试 encoding your string .您可能要查找的字符是 LF line feed,它对应于 %0A。也许是这样的:

This%20is%20a%20sentence.%0AThis%20is%20another%20sentence.

关于html - 如何在网站上的 WhatsApp 共享段落后添加中断?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32159931/

相关文章:

php - 如何使用 WhatsAPI Official 在 PHP 中从 WhatsApp 发送消息?

javascript - Canvas 游戏,如何保持清爽

javascript - Swiper-slide 垂直显示而不是水平显示

html - Angular Material 占位符和输入/文本区域样式

iphone - 使用 NSNetService 类与 Windows 计算机上共享的文件夹建立 SMB tcp ip 连接

android - 通过我在 android 上的应用程序共享 pdf 文件

swift - 通过 WhatsApp 分享图像

Android:如何以编程方式检查 WhatsApp 上的号码是否在线?

ios - Callkit 扬声器错误/WhatsApp 如何修复它?

javascript - div 在 <option> 标签或替代?