以下のhtmlファイルをブラウザで開いたのですが、javascriptファイルが読み込めていないようで、ボタンをクリックしても何も起きません。解決法を教えてください。
<index.htmlの中身>
html
1<!DOCTYPE html> 2<html> 3 <head> 4 <meta charset="utf-8"> 5 <title>index</title> 6 <link rel="stylesheet" href="master.css"> 7 <script src="https//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> 8 </head> 9 <body> 10 <div class="btn">ボタン</div> 11 <p>表示</p> 12 <script src="script.js"></script> 13 </body> 14</html>
<script.jsの中身(index.htmlと同じディレクトリ内)>
javascript
1$(function() { 2 $(".btn").click(funciton() { 3 $("p").fadeOut(); 4 }); 5});
回答1件
あなたの回答
tips
プレビュー