正在将jquery库下载到项目错误:java:索引4处的非法char <:>:http:\ api.jquery.com

Jan*_*Jan 2 javascript jquery spring intellij-idea

我使用Intellij Idea。我想下载jquery库以在Spring项目的Intellij Idea中离线访问它。所以我在链接上输入了“ Alt + enter”

 <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
Run Code Online (Sandbox Code Playgroud)

并选择“下载库”。该库已下载,问题是在它运行之后,我无法运行我的程序,因为一直以来我都看到错误:java:索引4:http:\ api.jquery.com上的char <:>非法,没有任何路径。我什至在整个项目中都没有写过类似的东西。

当我只有全局链接到“ https://code.jquery.com/jquery-1.12.4.min.js ”并可以正常访问Internet时。

我试图从intellij删除库后,将库下载到本地文件中,并实际上放置了标头链接。但仍然不起作用。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
</head>
<body>

    <input type="number" id="myInput" name="myInput" onchange="countOfTryings(this)">

    <a name="toChallenge" href="http://some_web_site.com?parameter1=4">This is link</a>
    <a name="toChallenge" href="http://some_web_site_other.com?parameter1=4">This is link 2</a>

    <script>
        function countOfTryings(variable) {
            $('a[name="toChallenge"]').each(function () {
                var oldUrl = $(this).attr("href"); // Get current url
                var str = oldUrl.substring(0, oldUrl.indexOf("parameter1"));
                var newUrl = oldUrl.replace(oldUrl, str + "parameter1=" + variable.value); // Create new url
                $(this).attr("href", newUrl); // Set herf value
            });
        }
    </script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

我希望程序更改名称为“ toChallenge”的超链接的URL。要将请求参数“ parameter1”的值更改为新值,将使用id =“ myInput”输入。

Jan*_*Jan 6

在向Intellij Idea提交报告后,我得到了一个答案,即JS库已添加到Java类路径中,这是一个错误,并且要解决该问题,我接下来需要做的是:项目设置(默认为ctrl + alt + shift + s) ->模块->在“模块”中选择“依赖关系”->查找jquery依赖关系->删除jquery依赖关系->单击“应用”