私はこの機能を利用しています。これはAndroid上で動作しますが、iOSの場合はすべてのバージョンで新しい空のウィンドウが開きます。どんなアイデア、なぜ?window.open( "sms:...")はアンドロイドでは動作しますが、iosでは動作しません
var ua = navigator.userAgent.toLowerCase();
var url;
if (ua.indexOf("iphone") > -1 || ua.indexOf("ipad") > -1)
{
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
var ver = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
if (ver[0] >= 8)
{
url = "sms:&body=" + encodeURIComponent("Hello guys, this is an awesome app! Check it out http://www.myurl.com/webapp/index.html");
}
else
{
url = "sms:;body=" + encodeURIComponent("Hello guys, this is an awesome app! Check it out http://www.myurlcom/webapp/index.html");
}
}
else
url = "sms:?body=" + encodeURIComponent("Hello guys, this is an awesome app! Check it out http://www.muyrl.com/webapp/index.html");
window.open (url,'_system')
がテストをありがとう、私はwindow.openの周囲で作業方法を考えてみますと、それはリード場所を確認します – user2426290