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
"setpass.vue?tel=" + user.phone字符串拼接即可
window.location.href = "setpass.vue?tel=" + user.phone
function goToClient(username,password){ window.location.href="client.jsp?username=" + username + "&password=" + password; }jsfdh [转]
<script type="text/javascript">
function goToClient(username,password){
window.location.href="client.jsp?username=" + username + "&password=" + password;
}
</script>
<a href="#" onclick="javascript:goToClient('u','p');">jsfdh</a>