当#$wxname#=vywxtg的时候才跳转应该怎么写?我这么写不跳转呀
程序代码:
<Script> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www. http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="format-detection" content="telephone=no"> <title><#$shopinfo[0]['shopname']#></title> <link rel="stylesheet" type="text/css" href="<#$Theme['P']['root']#>/tmpl/wifiadv/css/css.css"><!--风格--> <link rel="stylesheet" type="text/css" href="<#$Theme['P']['root']#>/tmpl/wifiadv/css/media.css"><!--自适应--> <link rel="stylesheet" type="text/css" href="<#$Theme['P']['root']#>/tmpl/wifiadv/css/form.css"><!--自适应--> </head> <body> <include file="public:head$wifiadv"/> <div class="mainbox bgform clearfix"> <div class="formbox"> <form name="regform"> <div class="tips" id="tips"></div> <label class="lb_title mr-tb-5" >关注微信公众号: <#$wxname#></br>微信名称: <#$wxpwd#></br>回复:"上网" 即可一键认证上网</label> <br> <center><img src="<#$wxewm#>" width="250" height="250"></center> <div class="tips mr-tb-5" id="scode" > <div class="onSuccess" id="scodetext">请打开微信,搜索或扫一扫(截图本屏并扫一扫相册里的文件)以上微信公众号关注后并回复:"上网",在<#$temptime#>分钟内完成微信认证 </div> <include file="public:foot"/> <!--当#$wxname#=vywxtg的时候才跳转应该怎么写?我这么写不跳转呀--> <Script> if (#$wxname#.equals('vywxtg')){ function jump(){ location.href='http://mp.weixin.'; } setTimeout('jump();',2000); } </script> <if condition="$weixint eq 1"><a class="btn_base corner-all-10 t-wh c-wifiadv uba mr-tb-10" href="javascript:launch_app();" id="btn_reg">点击打开微信</a></if> </div> </form> <div class="blockdiv"></div> </div> <script> //launch client app function launch_app() { if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) { // 判断useragent,当前设备为ios设备 var loadDateTime = new Date(); // 设置时间阈值,在规定时间里面没有打开对应App的话,直接去App store进行下载。 window.setTimeout(function() { var timeOutDateTime = new Date(); if (timeOutDateTime - loadDateTime < 5000) { window.location = "weixin:"; } else { window.close(); } }, 25); window.location = "weixin:"; // ios端URL Schema } else if (navigator.userAgent.match(/android/i)) { // 判断useragent,当前设备为andriod设备 window.open('http://weixin.', 'newwindow', ''); } else { // 判断useragent为桌面环境 //window.location= "http://www.baidu.com"; alert("Are You PC Browser ?!"); } } </script> </body> </html>