扫一扫在手机打开当前页

var url = window.location.href;
var urlname = url.substring(url.lastIndexOf(“/”) + 1,url.length);
urlname = “phone”+urlname;
url = url.substring(0 ,url.lastIndexOf(“/”)+1)+urlname;
$(‘#output’).qrcode({
width: 145,
height: 145,
correctLevel: 0,
render: “table”,
text: url
});

发表评论