首页 > 解决方案 > 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>

有什么想法可以解决吗?

标签: javascriptandroidhtmliosgoogle-chrome

解决方案


推荐阅读