吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 2472|回复: 20
收起左侧

[其他求助] 求助一个ppt正计时的模板,带动态计时的

[复制链接]
mengxiangcheng 发表于 2024-4-1 17:53
50吾爱币
求助一个ppt正计时的模板,带动态计时的

最佳答案

查看完整内容

这是单独的小时https://rb.ecsrz.com/h.html 这是年月日时分秒安https://rb.ecsrz.com/ymdhm.html [mw_shl_code=html,true] 安全生产时间计时器 body { font-family: Arial, sans-serif; background-color: #f2f2f2; margin: 0; padding: 0; } .container { text-align: center; margin-top: 100px; } h1 { color: #333; } #timer { font-size: 36px; color: #007bff; } .in ...

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

sivei 发表于 2024-4-1 17:53
本帖最后由 sivei 于 2024-4-2 17:23 编辑

这是单独的小时https://rb.ecsrz.com/h.html
这是年月日时分秒安https://rb.ecsrz.com/ymdhm.html
[HTML] 纯文本查看 复制代码
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>安全生产时间计时器</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
<style>
body {
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  margin: 0;
  padding: 0;
}
.container {
  text-align: center;
  margin-top: 100px;
}
h1 {
  color: #333;
}
#timer {
  font-size: 36px;
  color: #007bff;
}
.input-group {
  margin-bottom: 20px;
}
.input-group input {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}
.input-group button {
  padding: 8px 20px;
  border-radius: 4px;
  background-color: #007bff;
  color: #fff;
  border: none;
  cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
  <div class="input-group" id="inputGroup">
    <input type="datetime-local" id="startDateInput">
    <button>开始计时</button>
  </div>
  <div id="timer"></div>
</div>
<script>
function startTimer() {
  var startDateInput = document.getElementById('startDateInput').value;
  var startDate = new Date(startDateInput);
  var timerElement = document.getElementById('timer');
  var inputGroup = document.getElementById('inputGroup');
  inputGroup.style.display = 'none';
  setInterval(function() {
    var currentDate = new Date();
    var timeDifference = currentDate.getTime() - startDate.getTime();
    var hours = Math.floor(timeDifference / (1000 * 60 * 60));
    var timerText = "已安全生产" + hours + " 小时";
    timerElement.textContent = timerText;
  }, 1000);
}
</script>
</body>
</html>
这是网页端实现时间的代码。
小哲网络 发表于 2024-4-1 18:34
没听说过ppt里插入正计时,一般都是倒计时,、有单独得小软件实现正计时,但不是插入到ppt里得。
qianshuiyifang 发表于 2024-4-1 18:39
https://www.shinyware.net/flyclock.html
给你个软件,也是一样实现
 楼主| mengxiangcheng 发表于 2024-4-2 08:39
小哲网络 发表于 2024-4-1 18:34
没听说过ppt里插入正计时,一般都是倒计时,、有单独得小软件实现正计时,但不是插入到ppt里得。

类似单位安全生产计时的,xxx安全生产()小时
 楼主| mengxiangcheng 发表于 2024-4-2 08:40
qianshuiyifang 发表于 2024-4-1 18:39
https://www.shinyware.net/flyclock.html
给你个软件,也是一样实现

插不到ppt里,听说时用宏能做到
sivei 发表于 2024-4-2 09:08
曲线救国办法:
到网上找一个在线倒计时的东西,比如
https://www.lddgo.net/common/countdown-days这类,
打开office,加载项,搜索web viewer
然后将刚才那个网站的预览信息添加进去。你就获得一个计时器。
如果日期在今日之后,则是倒计时,日期在今日之前,则是正计时。
qiyi235 发表于 2024-4-2 09:32
试试这个软件
FlyClock官方版是一款安全稳定,而且快捷方便的PPT计时工具软件。该软件功能强大,界面精美,上手容易,新手也可以轻松操作。经常要组织各类发布与竞赛,但时间的控制一直是个难题,利用此软件可以轻松的控制ppT的播放时间,使会议按自己的计划进行。
http://www.shinyware.net

 楼主| mengxiangcheng 发表于 2024-4-2 12:18
Declare PtrSafe Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As Long
Declare PtrSafe Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Public mTimer  As Long


'计时函数,每一秒钟运行一次
Sub timer()
    Dim myDay As String
    myDay = "2024-3-11 16:00:00"
   
    ss = DateDiff("s", myDay, Now)
    If ss > 0 Then
      dd = ss \ 86400
      hh = (ss Mod 86400) \ 3600
      mm = (ss Mod 3600) \ 60
      ss = ss Mod 60
      Slide1.LabelFlashBoard.Caption = dd & "天" & hh & "时" & mm & "分" & ss & "秒"
      Slide1.LabelTitle.Caption = "焚烧系统稳定运行 "
    Else
      mTimer = KillTimer(0, mTimer)
      Slide1.LabelFlashBoard.Caption = myDay
      Slide1.LabelTitle.Caption = "铭记一刻"
    End If
End Sub

'1s调用一次timer函数计算间隔时间
Sub start()
    mTimer = SetTimer(0, 0, 1000, AddressOf timer)
End Sub
有大佬给看看这个代码的吗。跑一会就提示内存满了
 楼主| mengxiangcheng 发表于 2024-4-2 12:30
sivei 发表于 2024-4-2 09:08
曲线救国办法:
到网上找一个在线倒计时的东西,比如
https://www.lddgo.net/common/countdown-days这类 ...

6,有点意思了,就是时间还能精确吗,这个是天数
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - 52pojie.cn ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2026-5-14 22:50

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表