关于后台传过来的参数前端接受

移动开发 waitig 367℃ 百度已收录 0评论

<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>

<%
String TOKEN=request.getParameter("TOKEN");
String token=request.getParameter("token");
String key=request.getParameter("key");
String userid=request.getParameter("userid");
String ts =request.getParameter("ts");
String bossid =request.getParameter("bossid");
String SXTOKEN =request.getParameter("SXTOKEN");
%>

 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 
 <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
 
 
<!DOCTYPE html>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<title>首页</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<script>
//designWidth:设计稿的实际宽度值,需要根据实际设置
//maxWidth:制作稿的最大宽度值,需要根据实际设置
//这段js的最后面有两个参数记得要设置,一个为设计稿实际宽度,一个为制作稿最大宽度,例如设计稿为750,最大宽度为750,则为(750,750)
;
(function(designWidth, maxWidth) {
var doc = document,
win = window,
docEl = doc.documentElement,
remStyle = document.createElement("style"),
tid;

function refreshRem() {
var width = docEl.getBoundingClientRect().width;
maxWidth = maxWidth || 540;
width > maxWidth && (width = maxWidth);
var rem = width * 100 / designWidth;
remStyle.innerHTML = ‘html{font-size:’ + rem + ‘px;}’;
}

if(docEl.firstElementChild) {
docEl.firstElementChild.appendChild(remStyle);
} else {
var wrap = doc.createElement("div");
wrap.appendChild(remStyle);
doc.write(wrap.innerHTML);
wrap = null;
}
//要等 wiewport 设置好后才能执行 refreshRem,不然 refreshRem 会执行2次;
refreshRem();

win.addEventListener("resize", function() {
clearTimeout(tid); //防止执行两次
tid = setTimeout(refreshRem, 300);
}, false);

win.addEventListener("pageshow", function(e) {
if(e.persisted) { // 浏览器后退的时候重新计算
clearTimeout(tid);
tid = setTimeout(refreshRem, 300);
}
}, false);

if(doc.readyState === "complete") {
doc.body.style.fontSize = "16px";
} else {
doc.addEventListener("DOMContentLoaded", function(e) {
doc.body.style.fontSize = "16px";
}, false);
}
})(640, 1920);
</script>
</head>

<body>
<div class="top-box">
<div class="top">
<!–<img class="top-img1" src="images/top_l.png">–>市场集中化管理平台<!–<img class="top-img2" src="images/top_r.png"><i>1</i>–></div>
</div>
<div class="top-d">
<ul>
<li><a href="http://120.209.204.241:9002/osmp/clientAction.do?method=client&nextPage=/arcgis/source/list.jsp&TOKEN=<%=TOKEN%>"><img src="images/s1.png"></a><span>资源审批</span></li>
<li><a href="http://120.209.204.224:9002/ArcGIS/clientAction.do?method=client&nextPage=/arcgis/newchannelquota/channel_a.jsp&TOKEN=<%=TOKEN%>&key=<%=key%>&userid=<%=userid%>&bossid=<%=bossid%>&ts=<%=ts%> 
"><img src="images/s2.png"></a><span>渠道指标</span></li>
<li><a href="http://120.209.204.224:9001/qdzs/web/plugins/bui/ydzy/qdwhios.xp?doAction=getqd&token=<%=token%>"><img src="images/s3.png"></a><span>渠道维护</span></li>
</ul>

</div>
</body>

</html>


本文由【waitig】发表在等英博客
本文固定链接:关于后台传过来的参数前端接受
欢迎关注本站官方公众号,每日都有干货分享!
等英博客官方公众号
点赞 (0)分享 (0)