Javascript 未捕获引用错误:未在HTMLButtoneElement.onclick上定义do_登录

Javascript 未捕获引用错误:未在HTMLButtoneElement.onclick上定义do_登录,javascript,php,jquery,mysql,ajax,Javascript,Php,Jquery,Mysql,Ajax,我正在尝试使用PHP、AJAX和MySql开发一个简单的登录页面。 经过长期的斗争,我做到了: <head> <link rel="stylesheet" type="text/css" href="css\\login.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> funct

我正在尝试使用PHP、AJAX和MySql开发一个简单的登录页面。 经过长期的斗争,我做到了:

    <head>
  <link rel="stylesheet" type="text/css" href="css\\login.css">
  <script  src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">

                    function do_login()
                    {
                     var username=$("#username").val();
                     var pass=$("#password").val();
                     if(email!="" && pass!="")
                     {

                      $.ajax
                      ({
                      type:'post',
                      url:'serveur.php',
                      data:{
                       do_login:"do_login",
                       username:username,
                       password:pass
                      },
                      success:function(response) {
                      if(response=="success")
                      {
                        window.location.href="index.php";
                        console.log(1);
                      }
                      else
                      {

                        alert("Wrong Details");
                        console.log(0);
                      }
                      }
                      });
                     }

                     else
                     {
                      alert("Please Fill All The Details");
                     }
                        return false ; 


                    }

</script>
</head>

</style>
<body>


<div class="login-page">
  <div class="form">

    <form class="login-form">
      <input type="username" placeholder="username" id="text" />
      <input type="password" placeholder="password" id="password" />
      <button type="submit" id="loginButt" onclick="do_login()">login</button>
      <p class="message"><a href="1stPage.html">Go Back</a></p>
      <div id="resultat ">Authentification result Here ....</div>
    </form>
  </div>
</div>
</body>

函数do_login()
{
var username=$(“#username”).val();
var pass=$(“#密码”).val();
如果(电子邮件!=“”&&pass!=“”)
{
$.ajax
({
类型:'post',
url:'serveur.php',
数据:{
do_登录:“do_登录”,
用户名:用户名,
密码:pass
},
成功:功能(响应){
如果(响应=“成功”)
{
window.location.href=“index.php”;
控制台日志(1);
}
其他的
{
警报(“错误的详细信息”);
控制台日志(0);
}
}
});
}
其他的
{
警告(“请填写所有详细信息”);
}
返回false;
}
登录

此处的身份验证结果。。。。
但我有一条错误信息:

未捕获引用错误:未在HTMLButtoneElement.onclick上定义do_登录

您的
标记同时具有主体和
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>
它不起作用。我想问题是当我在按钮标记内调用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>