〇〇七章 日期控件与日期函数

释放双眼,带上耳机,听听看~!

<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=gbk” />
<script type=”text/javascript” class=”lazyload” src=”data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC” data-original=”http:js控件存放地址WdatePicker.js” charset=”utf-8″ ></script>
<title>js日期控件</title>
</head>
<body>
<form action=”http:post地址” method=”post”>
<input name=”d1″ size=”30″ type=”text” id=”time” value=”选择时间” onClick=”Calendar(‘time’)”>
<br>
<input name=”d2″ size=”30″ type=”text” id=”tt” value=”选择时间” onClick=”Calendar(‘tt’)”>
<br>
<input name=”d3″ size=”30″ type=”text” id=”tim” value=”选择时间” onClick=”Calendar(‘tim’)”>
<input type=”submit”>
</form>
<br>
<?php echo $_POST[“d1”].'</br>’;
echo $_POST[“d2”].'</br>’;
echo $_POST[“d3”].'</br>’;
echo round((strtotime($_POST[“d1”] )-strtotime(date(“Y-m-d”)))/86400).'</br>’ ;//离今天多少天
echo round((strtotime($_POST[“d3”] )-strtotime($_POST[“d2”] ))/86400);//日期天数之差
echo date(‘Y-m-d’,strtotime(‘+7day’));//今天加7天
echo date(‘Y-m-d’,strtotime(‘+7day’,strtotime($yxq))) ;//某天$yxq加7天
echo date(‘Y-m-d’,strtotime($yxq.’+7day’)) ; //某天$yxq加7天
?>
</body>

【转自慕课】https://www.imooc.com

PHP

TP5 __STATIC__缺失public的解决方案

2022-3-3 16:41:20

PHP

php与人工智能有什么区别和联系?

2022-3-3 16:42:24

搜索