首页 > vue如何拨打电话

vue如何拨打电话

template

<button type="button" v-on:click="phoneCall('110')" >预约热线:110</button>

script

export default {
  methods: {
    phoneCall: function (msg) {
      console.log(msg)
      //window.location.href="tel:110"  无效,编译也通不过,编译不出tel是啥
    }
  }
}

window.location.href = 'tel://0755637'


window.location.href="tel:110"


<a href="tel:{{ tel }}">{{ tel }}</a>
【热门文章】
【热门文章】