如何在jQuery Mobile中的Web服务数据前面显示时间 [英] How to show time in front of web service data in jquery mobile

查看:82
本文介绍了如何在jQuery Mobile中的Web服务数据前面显示时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

![在此处输入图片描述] [1] 你好 我正在从Web套接字获取服务器数据,但是我面临一个问题,我需要在Web服务数据的前端到前端显示当前时间,如show..I能够显示数据,但时间不在此之前. :(

![enter image description here][1] Hi I am getting server data from web socket but i am facing one problem that i need to show current time in the from to front of web service data as show ..I am able to show data but time is not in front of that..:(

如何在数据前显示时间.

How to show time in front of data.

我正在这样使用

function nativePluginResultHandler (result)
{
      $('#realTimeContents' ).append('<p>'+result+'</p>');

}

!

推荐答案

来自此答案:为什么不接受服务器的附加结果,然后再执行javascript时间戳工作?

Why wouldn't taking your server's appended results and then prepending with the javascript time stamp work?

  $('#time').prepend("<b>" + hours + ":" + minutes + " " + "</b>");

这篇关于如何在jQuery Mobile中的Web服务数据前面显示时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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