我正在尝试在按钮点击时获取JSON数据
以下是HTML代码:
<html>
<title> </title>
<body>
<h2> Main API - http://api.kalendern.se/api</h3>
<form method="get" enctype="application/json; charset=utf-8"
action="http://api.example.com" border="1">
<input type=submit value="Show Main API"> </td>
</form>
</body>
</html>
我正在获取XML数据。
然而,我需要JSON数据。我该怎么做呢?
我设置的enctype和content-type是否相同?
如果不是,有什么区别,获取JSON数据的正确值是什么?
谢谢。
开发者