【问题标题】:Including jQuery Ul widgets. How to include jQuery Ul on localhost?包括 jQuery Ul 小部件。如何在本地主机上包含 jQuery Ul?
【发布时间】:2017-11-16 09:48:07
【问题描述】:

我正在尝试使用带有 XAMPP 的本地服务器构建 jQuery 代码。问题是当我尝试包含 jQueryUI 时。当我以标准方式在浏览器中打开文件时,它工作正常,但是当我在 localhost 中打开它时,它会显示此错误:

GET http://localhost/jQuery_files/jquery-ui-1.12.1/jquery-ui.css net::ERR_ABORTED。

我在这里遗漏了什么,有什么解决办法吗?

<head>
    <link href="jquery-ui-1.12.1/jquery-ui.css" rel="stylesheet">
</head>
<body>
    <script src="jquery-ui-1.12.1/jquery-ui.js"></script>
</body>

【问题讨论】:

  • 为什么将它包含在正文中?而不是在头部或身体之后?
  • 你把文件下载到本地,放到jquery-ui-1.12.1下了吗?如果不先这样做
  • @MihaiT 将脚本放在

标签: javascript jquery xampp


【解决方案1】:

需要下载jquery库文件在localhost中使用,也可以通过jquery库的绝对路径包含jquery。

参考这里 https://www.w3schools.com/jquery/jquery_get_started.asp

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-11-16
    • 1970-01-01
    • 1970-01-01
    • 2011-05-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多