javascript - Chrome 问题 - 通过单击 URL 打开移动短信应用
问题描述
我需要通过单击 URL 打开带有预填充正文和收件人的手机短信应用程序。
所以我写了这段代码,它在 firefox 中运行良好。但它不适用于 chrome。
<html>
<head>
<script type="text/javascript">
function f(){
window.location="sms://+12345?body=1234";}
</script>
</head>
<body onload="f();">
</body>
</html>
有什么想法可以解决吗?
解决方案
推荐阅读
- c++ - 对临时对象进行哪些操作可以防止其寿命延长?
- facebook - Instagram API 使用
- node.js - react-tables 在本地而不是在生产中正常工作,在网格中生成原始 html 文件内容
- python - 检查多列中是否有 NaN 值
- c# - 使用图形 api 缺少响应创建新团队
- asp.net - 模型绑定未执行
- node.js - 无法连接到 Node.js 中的事件桥
- sql - Microsoft SQL 和 SSAS 刚性关系
- java - 如何准备一个大的 txt 文件以使用 Hibernate 批量插入?
- sparql - sparql-gremlin:如何使用 java 实现相同的目标?