Why jQuery does not work on my home (local) machine?

前端 未结 6 1950
失恋的感觉
失恋的感觉 2020-11-30 12:56

My question isn\'t so much about why a specific bit of jQuery I\'ve written isn\'t working as it is about no jQuery at all is working; not even working examples I\'ve copied

6条回答
  •  清歌不尽
    2020-11-30 13:38

    The way you load jQuery might be a problem. When you start your URL with // it is supposed to work when page is being browsed via HTTP or HTTPS protocols. However, if you will open it as a local file it won't work.

    Given that your example works over HTTP I suggest you try to include jQuery as following:

    
    

提交回复
热议问题