亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

js processing events for previous and next years

Processing the information of the previous and next month and the previous and next year

Add one after December to become January and add 1# to the year

##One month before subtracting one is December and the year should be subtracted by one

##The code is as follows:

<?php
$prey=$nexty=$year;
$prem=$nextm=$mon;
if($prem<=1){
$prem=12;
$prey--;
}else{
$prem--;
}
if($nextm>=12){
$nextm=1;
$nexty++;
}else{
$nextm++;
}
$prey=$year-1;//上一年
$nexty=$year+1;//下一年
//超鏈接
echo "<tr><td colspan='7'align='center'>";
echo "<a href='sy1.php?y={$prey}'><<</a> ";
echo "<div>{$year}年</div>";
echo "<a href='sy1.php?y={$nexty}'>>></a>  ";
echo " ";
echo "<a href='sy1.php?m={$prem}'><</a> ";
echo "<div>{$mon}月</div> ";
echo "<a href='sy1.php?m={$nextm}'>></a>";
echo "</td></tr>";

Run as follows:

微信圖片_20180313153823.png

Submitted get request click event display effect:

Continuing Learning
||
<?php echo "上下年月的js處理事件";
submitReset Code