```<a href="" id="preday">上一天</a>&nbsp;
<a href="<%=basePath%>pages/zhbg/rc/powerdata/RCList2.jsp?q_FBSJ=<%=new TimeUtil().getToday()%>" id="today">今天</a>&nbsp;
<a href="<%=basePath%>pages/zhbg/rc/powerdata/RCList2.jsp?q_FBSJ=<%=new TimeUtil().PreOrNextDay("+")%>" id="nextday">下一天</a>
<script type="text/javascript">
var url="<%=basePath%>pages/zhbg/rc/powerdata/RCList2.jsp?q_FBSJ=";
document.getElementById("preday").href=url+PreOrNextDay("-");
</script>
```

这是一个测试页面。

```<html>
<script type="text/javascript">
var currDT = new Date();

//增加或减少一天，由ope决定, + 为加，- 为减，否则不动
function PreOrNextDay(ope) {
var num = 0;
if (ope == "-") {
num = -1;
} else if (ope == "+") {
num = 1;
}
var y = currDT.getYear();//年
var m = currDT.getMonth();//月
var lastDay = getLastDay(y, m); //每个月是多少天
var d = currDT.getDate();//日
d += num;
if (d < 1) {
m--;
if (m < 0) {
y--;
m = 11;
}
d = getLastDay(y, m);
} else if (d > lastDay) {
m++;
if (m > 11) {
y++;
m = 0;
}
d = 1;
}
currDT.setYear(y);
currDT.setMonth(m);
currDT.setDate(d);
return currDT;
}
</script>

<body>
<!--加载时初始页面-->

<script type="text/javascript">

</script>

</body>

</html>```

2个回答

request.setAttribute("",currDT);

js也一样
{"ft_lang_label":"__label__zh","ft_lang_prob":0.6307701,"math_prob":0.8972566,"size":12070,"snap":"2020-45-2020-50","text_gpt3_token_len":6092,"char_repetition_ratio":0.11379082,"word_repetition_ratio":0.049043063,"special_character_ratio":0.2988401,"punctuation_ratio":0.22413793,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9953833,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-29T03:08:28Z\",\"WARC-Record-ID\":\"<urn:uuid:310efc51-47a6-4464-a17a-a784d0b2d8ed>\",\"Content-Length\":\"138195\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a9a67472-af68-4675-ac6a-5526654d7615>\",\"WARC-Concurrent-To\":\"<urn:uuid:220eafa8-7e95-4c3c-86a0-793e33d8943f>\",\"WARC-IP-Address\":\"47.95.50.136\",\"WARC-Target-URI\":\"https://ask.csdn.net/questions/737556\",\"WARC-Payload-Digest\":\"sha1:4LZI7LIEXTTVGL4CXXYCZE4S22K72CYU\",\"WARC-Block-Digest\":\"sha1:NIV4YFUQHKJEETZ4N3PZSJCO5BXPOYNZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107902683.56_warc_CC-MAIN-20201029010437-20201029040437-00350.warc.gz\"}"}