2

我不知道如何创建一个允许将多个数字转储到 Message 应用程序的 HTML 链接。我试过用逗号和分号分隔,但没有任何运气。请让我知道这是否可行,因为我在 Apple 的 URL 方案参考页面上找不到任何关于向多个号码发送文本的信息。

4

2 回答 2

4

尝试这个:

<a href="sms:/open?addresses=12345678901,98765432109">Two Numbers, no message</a>

它应该对 iOS 有用。

于 2018-05-19T04:02:08.077 回答
1

Apple 关于为 iOS形成文本链接的文档声明它只接受单个电话号码,没有其他参数(即使竞争对手支持 ?body= 与 mailto 相同:链接与 ?subject=foo&message=bar 一起使用)。看起来这也适用于不止一个数字,我在 JSFidle 中的每个测试都只产生第一个数字,并且根本没有指定消息的数字。我建议您调整您的开发,以便按顺序处理您希望发送的每条消息,或者仅针对一个可用的收件人进行调整。

<!-- works fine -->  
<a href="sms:12345678901">Single Number, no message</a>
<br />
<!-- works for first number only -->
<a href="sms:12345678901,98765432109">Two Numbers, no message</a>
<br />
<!-- doesn't work at all -->
<a href="sms:12345678901?body=hello">Single Number, with message</a>
<br />
<!-- doesn't work at all -->
<a href="sms:12345678901,98765432109?body=hello">Two Numbers, with message</a>
于 2013-09-16T20:26:47.013 回答