Uncaught ReferenceError: xxx is not defined
at HTMLButtonElement.onclick
html中调用js方法一直报错,找了半天,最后发现html引入外部js库的时候居然是这样写的
<script src="https://code.jquery.com/jquery-3.1.1.min.js"/>
真是。。。
script标签是要成对出现的<script></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>