html中有個變量為user.phone;有個點擊函數為setpass
javascript代碼如下:
setPass: function() {
window.location.href="setpass.vue?tel=%s" % this.user.phone;
}
請問window.location.href="setpass.vue?tel=這裡要如何寫才能讓this.user.phone傳遞過去呢?謝謝。
window.location.href = "setpass.vue?tel=" + user.phone