如何使用带有JSON的版本号并在html中显示版本号 [英] How do I use version numbers with JSON And show the version numbers in html

查看:164
本文介绍了如何使用带有JSON的版本号并在html中显示版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一台24/7运行的服务器,我有一个 .JSON 文件我已经定义了所有内容,但我需要知道的是我的 .html 文件找到一个 .JSON 文件读取它,将当前json与新json进行比较,并显示它。



这是我想要做的事情。

我有1台服务器承载 .JSON 文件然后我有一台计算机有一个 .JSON 文件现在当有人打开我制作的html我希望它显示JSON文件的版本号在计算机上和服务器上的那个。

那么我该怎么办?!?!




和求助这是我的 .JSON 文件。



服务器端:

manifest.json :

So I have a server that Runs 24/7 and I have a .JSON file on it I have defined everything but what I need to know is how can my .html file find that one .JSON file read it, compare the current json to the new json, and display it.

Here is what I am trying to do.
I have 1 server That hosts a .JSON file then I have a computer that has a .JSON file now when someone opens the html I made I want it to display the version number of the JSON file on the computer and the one on the server.
So How do I do it?!?!



And For Help Here Are my .JSON files.

SERVER SIDE:
manifest.json:

{
  "manifest_version": 2,
  "name": "-",
  "version": "1.2.2"
}







电脑侧:

manifest.json:




COMPUTER SIDE:
manifest.json:

{
  "manifest_version": 2,
  "name": "-",
  "version": "1.2.0"
}








这就是我想在html中发生的事情:







And here is what I want to happen in the html:

Your Version: 1.2.0
Actual/Current Version: 1.2.2





所以我该怎么做?!

推荐答案

这应该会为您提供所需的信息:



http://stackoverflow.com/questions/12070631/how -to-use-json-file-in-html-code [ ^ ]
This should give you the information you need:

http://stackoverflow.com/questions/12070631/how-to-use-json-file-in-html-code[^]


这篇关于如何使用带有JSON的版本号并在html中显示版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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