1
A
回答
1
将这个数据源中的onCurrentElementChange
事件与网格相关:
if (this.getCurrentElement()!==null){
\t //format time value in data grid
\t $$('dataGrid1').column('timeStamp').setRenderer(
function(myCell) {
if (myCell.value > 0)
return formatSeconds(myCell.value);//formatting using the ultility function
\t }
\t); \t \t
}
然后在你的代码中formatSeconds
功能:
function formatSeconds(milliseconds) {
\t var date = new Date(1970,0,1);
\t date.setSeconds(milliseconds/1000);
\t return date.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");
\t }
相关问题
- 1. Javascript以毫秒为单位显示毫秒数:小时:无秒数分钟
- 2. d3.js:在x轴上显示小时,分钟,秒,毫秒
- 3. 如何显示在天毫秒为单位:小时:分钟:秒
- 4. 从毫秒到小时,分钟,秒和毫秒
- 5. PHP/MySQL毫秒到小时:分钟:秒
- 6. 显示毫秒
- 7. 以秒,毫秒显示datediff
- 8. 格式时间从秒到毫秒:秒:毫秒:微秒
- 9. 格式输入字段“时间”不显示秒和毫秒
- 10. 在matplotlib中显示毫秒
- 11. 在Excel中显示毫秒
- 12. javascript毫秒分析时间(分钟:秒)
- 13. 格式NSTimeInterval分钟:秒:毫秒
- 14. 如何在JavaScript中将时间毫秒转换为小时,分钟,秒格式?
- 15. 在计时器中显示毫秒html
- 16. 将毫秒转换为小时格式
- 17. Java的时间(分钟:秒:毫秒)
- 18. 如何在C#中使秒表显示秒和毫秒?
- 19. 显示CFGregorianDate而不毫秒
- 20. 用于显示毫秒
- 21. 倒计时秒数:毫秒
- 22. 时间以秒或毫秒
- 23. 将毫秒转换为天,小时,分和秒
- 24. 将毫秒转换为小时,分钟和秒python
- 25. 将毫秒转换为小时,分和秒
- 26. Wireshark:以毫秒显示时间?
- 27. Sqllite时间函数显示的毫秒
- 28. 用倒计时显示毫秒的javascript
- 29. 获取时间时,分,秒,毫秒,微秒
- 30. 在JS秒表中格式化毫秒