Asp.net MVC4如何构建客户端计时器 [英] Asp.net MVC4 How to build a Client side Timer

查看:89
本文介绍了Asp.net MVC4如何构建客户端计时器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。



一直在网上浏览一段时间,没有运气。



我需要在运行客户端的Asp.net MVC4中构建一个Timer。还需要将启动和停止时间保存到sql compact 4数据库中。



所以启动一个变量将保持一段时间。

- 时间流逝 -
停止计时器上的
将再次持续。

- 发送时间到数据库 -



需要发送到数据库来计算总时间。



我的变量目前是DateTime类型。





感谢高级。

Hi All.

Have been browsing the net for some time now, with no luck.

I need to build a Timer in Asp.net MVC4 that runs client side. Also will need to have the start and stop times saved to a sql compact 4 database.

so on start a variable will hold a time.
- Time elapses -
on stop timer will hold another time.
- Send times to database -

need to send to the data database to work out the total time elapsed.

My variable currently are of DateTime Type.


Thanks in Advanced.

推荐答案

正如Sanjay所说,你将不得不使用javascript / jQuery。我已经创建了您需要的高级实现。你必须完成它!看看这个小提琴:



http://jsfiddle.net/SKYup/ [ ^ ]
As Sanjay said, you will have to use a javascript/ jQuery. I have created a high level implementation of what you need. You will have to finish it up! Have a look at this fiddle:

http://jsfiddle.net/SKYup/[^]


这篇关于Asp.net MVC4如何构建客户端计时器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆