Why I cant use jQuery functionality

后端 未结 1 1131
面向向阳花
面向向阳花 2020-12-04 02:39

I have jquery-2.1.3.js library in the /opt/lampp/htdocs directory and to test it I included it in a html file


    <         


        
相关标签:
1条回答
  • 2020-12-04 03:15

    script elements can have a src attribute or content, but not both. If they have both, the content is ignored (the content is considered "script documentation," not code).

    Use another script block for your jQuery script

    <script src="jquery-2.1.3.js">
    </script>
    <script>
        $("p").css("color","orange")
        $("body").css("background","#00ff00")
    </script>
    
    0 讨论(0)
提交回复
热议问题