首页 > 代码库 > 一个简单的ASP.NEW MVC4网站(二)

一个简单的ASP.NEW MVC4网站(二)

                            

                                             一个简单的ASP.NEW MVC4网站(二)

      今天给网站增加了注册见面,代码为:

@{    Layout = null;}<!DOCTYPE html><html><head>    <meta name="viewport" content="width=device-width" />    <title>Registration</title>    <link rel="shortcut icon" href=http://www.mamicode.com/"~/ICO/MP3.ico" type="image/x-icon" />    <link href=http://www.mamicode.com/"~/Themes/css/index.css" rel="stylesheet" />    <link href=http://www.mamicode.com/"~/Themes/css/Registration.css" rel="stylesheet" />    <script src=http://www.mamicode.com/"~/Themes/easyui/jquery.easyui.min.js"></script>    <link href=http://www.mamicode.com/"~/Themes/easyui/themes/gray/validatebox.css" rel="stylesheet" />    <link href=http://www.mamicode.com/"~/Themes/easyui/themes/icon.css" rel="stylesheet" />    <script src=http://www.mamicode.com/"~/Themes/easyui/plugins/jquery.validatebox.js"></script>    <script src=http://www.mamicode.com/"~/Themes/easyui/locale/easyui-lang-zh_CN.js"></script>    <script src=http://www.mamicode.com/"~/Themes/js/md5.js"></script>    <script type="text/javascript">        $(document).ready(function () {            $("#sub").click(function () {                $.ajax({                    method: "post",                    url: "/User/RegistrationIn",                    async: true,                    data:                    {                        user: $("#user").val(),                        pwd: hex_md5($("#pwd").val()),                        rpwd: hex_md5($("#pwd").val())                    },                    datatype: JSON,                    callback: loading,                    success: AjaxSuccess                });            });        });    </script></head><body>    <div id="div">        <div id="head">            <img src=http://www.mamicode.com/"/Themes/img/newhead.jpg" alt="发哥MUSIC" />        </div>        <div id="nav">            <ul>                <li><a>古典</a></li>                <li><a>摇滚</a></li>                <li><a>爵士</a></li>                <li><a>民谣</a></li>                <li><a>流行</a></li>                <li><a>校园</a></li>                <li><a>草原</a></li>                <li><a>电子</a></li>                <li class="search" id="search_text">                    <input type="text" /></li>                <li class="search" id="search_btn">                    <img src=http://www.mamicode.com/"~/Themes/img/search.png" /></li>            </ul>        </div>        <div id="r_div">            <div id="r_head">                <image src=http://www.mamicode.com/"~/Themes/img/UserGroup.png" id="user_img" />                <h2>用户注册</h2>            </div>            <div id="r_input">                <span>邮&nbsp;&nbsp;&nbsp;&nbsp;箱:</span><input type="text" name="user" id="user" class="r_input" /><br />                <br />                <span>密&nbsp;&nbsp;&nbsp;&nbsp;码:</span><input type="text" name="pwd" id="pwd" class="r_input" /><br />                <br />                <span>再次输入:</span><input type="text" name="rpwd" class="r_input" id="rpwd" /><br />                <br />                <span>验证码&nbsp;&nbsp;:</span><input type="text" name="user" id="ver_input" /><image src=http://www.mamicode.com/"../Common/VerCode" id="vercode" /><br />                <br />                <button type="button" id="sub">注册</button>            </div>        </div>    </div></body></html>
View Code

      虽然是后端人员,但是自己认为前端还是做得不错!