html调用github上的js文件时的问题

Resource interpreted as Script but transferred with MIME type text/plain: "https://raw.githubusercontent.com/alleni123/com.lj/master/jquery_draggable.js". new_file.html:9
Refused to execute script from 'https://raw.githubusercontent.com/alleni123/com.lj/master/jquery_draggable.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.



在google上查了一下, 找到解决方案。
就是把 raw.githubusercontent.com替换为rawgithub.com

问题就解决了。

你可能感兴趣的:(JavaScript,github)