index1.html 1.4 KB
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<h3>测试用</h3>
<form>
    手机号:<input type="text" value="" name="mobile" id="mobile">
    验证码:<input type="text" value="" name="mobile_code" id="mobile_code">
    <!--<input  type="button" id="get_code" value="获取验证码" class="ver_codebtn" />-->
    密码:<input type="text" value="" name="user_pass" id="user_pass">
    <input  type="button" id="get_code" value="提交表单" class="ver_codebtn" />
</form>
</body>
</html>
<script src="__TMPL__/public/assets/js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script>
    //登录
    $('#get_code').click(function () {
        var mobile = $('#mobile').val();
        var user_pass = $('#user_pass').val();
        var mobile_code = $('#mobile_code').val();
        $.ajax({
            type : 'POST',
            url : "{:url('star/comment')}",
            data : {
                'mobile' : mobile,
//                'mobile_code' : mobile_code,
                'user_pass' : user_pass
            },
            dataType : 'json',
            success :function(data){
                console.log(data);
            }
        })
    })
</script>