您的
<script>
标签同时具有正文和 src
属性。
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
// This is the body of the script tag
function do_login() {
//...
}
</script>
src
标签的<script>
属性优先于标签正文(请参阅JavaScript:具有SRC属性的内联脚本?)。所以这意味着你的 do_login
函数实际上从未被定义:(
尝试将其更改为
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" />
<script type="text/javascript">
function do_login() {
//...
}
</script>
未捕获的运行时错误: × 错误 求解未定义 ReferenceError:解决未定义 在 HTMLButtonElement.onclick (http://localhost:3000/?first=rama.1%40gmail.com&password=ram123:33:25)