相关疑难解决方法(0)

在html中链接jquery

我无法成功将jQuery链接到我的html.我已经制作了最简单的jQuery代码,所以我知道它是正确的,我已经尝试了我能想到的一切 - 搜索没有帮助..

我的html(文件名:"test.html":

<!DOCTYPE html>
<html>
    <head>
        <title>Test</title>
        <link rel="stylesheet" type="css/text" href="test.css"/>
        <script type="text/javascript" src="test.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
    </head>
    <body>
        <div id="orange"></div>
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

我的CSS(文件名:"test.css"):

#orange {
    height: 100px;
    width: 100px;
    background-color: orange;
    border-radius: 5px;
    border: 3px solid black;
    margin-left: 100px;
    margin-top: 100px;
    display: none;
}
Run Code Online (Sandbox Code Playgroud)

我的JS(文件名:"test.js"):

$(document).ready(function() {
    $('div').fadeIn('slow');
});
Run Code Online (Sandbox Code Playgroud)

控制台显示jQuery链接在6.52s加载.

我也尝试从我下载的jQuery文件链接

<script src="C:\jQuery\jquery.js"></script> 
Run Code Online (Sandbox Code Playgroud)

这也失败了......

然而我设法以某种方式链接jQuery UI并运行".accordion()"... = /

jquery

26
推荐指数
1
解决办法
22万
查看次数

标签 统计

jquery ×1