0

当我尝试按下按钮打开电话号码时出现此错误。

Iphone 完美运行,但当我尝试从 iPad 打开它时出现错误

我正在使用的代码如下:

showMenuItem: function(homeMenu, index, target, record){
   var mainView = this.getMain(),
   nextView, actualView = mainView.getActiveItem(),
   animation = this.getAnimation('slide','left');
   switch (index) {
      case 0:
         // option menu not works in iPad //
         location.href = 'tel:900909090';
         break;
      case 1:
      ....
  ....

我尝试以其他方式这样做,但它在我的 iPad 上不起作用:我尝试过:

window.open('tel:900909090');
document.location.href = 'tel:900909090';
window.plugins.phoneDialer.dial('tel:900909090');

在另一个窗口中,我有一个使用该标签的手机链接<a href...并且可以工作,但是在这部分代码中,我认为您无法获得此标签。

有任何想法吗?

4

1 回答 1

1

那是因为您的 iPad 上没有插入 SIM 卡……而您的 iPhone 具有通话功能。没有安装任何邮件帐户的“mailto:”链接也会发生这种情况。

于 2014-08-19T06:36:53.883 回答