English 中文(简体)
从JavaScript的应用程序中获取 PC 日期吗?
原标题:Get the PC date from an app in JavaScript?
  • 时间:2012-05-24 19:05:28
  •  标签:
  • javascript

After trying many googlings I can not find any thing related to this problem. What I wanted is getting my PC s date not the Google s server date. I did try by using URLFetchApp to make a HTTP request with a hope that some JavaScript can be executed and then I can have a nice PC s date as the response but it was not so simple. I do not really have no idea how to make some progress right now so may you can give some hints?

问题回答

当然,你需要这个:

(1) 在应用程序侧设置一个 URI 以检索数据

(2) 在你的客户方面使用微小的刺绣 来捕捉日期, 并将其翻译给JSON。

(3) 将JSON送至乌拉圭。

如果您能让客户端启动它, 这将更容易得多, 比如在您页面加载时, 但它 < em> can 需要服务器侧端请求完成 。

如何处理此事项的详情在某种程度上取决于 Javascript 库 等 。 我喜欢 jQuery, 这将使第二步像 jQuery.toJSON( new Date ()) 一样。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签