Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我现在正在使用框架 Yii 开发一个网站,我需要使用计时器来限制某个页面的访问时间,但我不知道如何处理它。即,用户在填写表格时,必须在有限的时间内完成填写,否则不允许填写剩余的表格。我想知道我应该怎么做以及在哪里可以找到满足我需要的计时器?非常感谢。
不,Yii 中没有可用的计时器。正如@Imre L 建议的那样,在服务器端使用会话。
我正在开发一个在线测验应用程序,它提供了所有问题的列表,当用户单击问题编号时,应显示相应的问题。当用户单击任何问题编号时,应更改问题编号单元格的背景颜色。为此,我的 JS 如下
<script> function changecolor(x) { document.getElementById(x).style.background-color="#4ead3a";