首页 > 解决方案 > 尝试使用google jquery ajax api有什么问题

问题描述

我正在尝试使用 JQuery 设置使用 OpenWeatherMap (openweathermap.org) 的页面,但在页面开头附近出现 403 错误。

页面开始

<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" /><title>Weather API</title>
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”&gt;</script>
</head>
<body>

但我在控制台日志中看到:

Navigated to http://minkhost:7080/weather.html
14:03:55.970 weather.html:5 GET http://minkhost:7080/%C3%A2%E2%82%AC%C2%9Dhttps://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js%C3%A2%E2%82%AC%C2%9D net::ERR_ABORTED 403 (Forbidden)
14:03:55.970 weather.html:17 Uncaught SyntaxError: Invalid or unexpected token

我需要以某种方式更改字符集吗?如果我需要从页面中包含更多内容,请告诉我。

标签: javascripthtmljqueryajaxapi

解决方案


推荐阅读