小編給大家分享一下MVC+EasyUI+三層新聞網(wǎng)站如何搭建后臺(tái)登錄界面,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
新聞網(wǎng)站建立,后臺(tái)登錄界面的搭建
首先我們?cè)贑ontrollers里面新添加一個(gè)控制器就叫LoginController,右鍵點(diǎn)擊Controllers添加控制器就可以了(注意后面一定是Controller結(jié)尾,這是一種約定)
其次:右鍵點(diǎn)擊index建立Index視圖。(不選擇使用母版頁(yè))
現(xiàn)在我們就可以在Index視圖中設(shè)計(jì)我們的登錄頁(yè)面了。
這里需要我們引入幾個(gè)Css樣式和JS文件
簡(jiǎn)單的進(jìn)行登錄界面的布局
<html> <head> <meta name="viewport" content="width=device-width" /> <title>登錄</title> <script src="~/Scripts/jquery-1.8.2.js"></script> <script src="~/Content/EasyUI/jquery.easyui.min.js"></script> <script src="~/Content/EasyUI/easyui-lang-zh_CN.js"></script> <link href="~/Content/EasyUI/themes/default/easyui.css" rel="external nofollow" rel="stylesheet" /> <link href="~/Content/EasyUI/themes/icon.css" rel="external nofollow" rel="stylesheet" /> <script type="text/javascript"> $(function () { initWin(); //初始化登錄窗體 }); function initWin() { $("#win").window({ title: "登錄", width: 400, height: 270, collapsible: false, minimizable: false, maximizable: false, closable: false, modal: true, resizable: false, }); } </script> </head> <body> <div id="win"class="easyui-window"> <div> <div ></div> <table> <tr> <td ></td> <td>用戶(hù)名:</td> <td><input type="text"class="easyui-textbox" id="txtName" name="txtName"/></td> <td><span id="spanName" ></span></td> </tr> <tr ></tr> <tr> <td ></td> <td>密 碼:</td> <td><input type="password/"class="easyui-textbox"id="txtPwd" name="txtPwd"></td> <td><span id="spanPwd" ></span></td> </tr> <tr ></tr> <tr> <td ></td> <td>驗(yàn)證碼:</td> <td><input type="text"class="easyui-textbox" id="txtVcode" name="txtVcode"/></td> <td><span id="spanVcode"></span></td> </tr> <tr ></tr> <tr> <td ></td> <td><img id="image" src="" /></td> <td><a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" id="changeVcode">看不清,換一張</a></td> </tr> </table> </div> <div ></div> <div data-options="region:'south',border:false" > <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" rel="external nofollow" rel="external nofollow" id="btnOk" >登錄</a> </div> </div> </body> </html>
運(yùn)行的結(jié)果圖:
這里驗(yàn)證碼的圖片沒(méi)有顯示出來(lái),這是沒(méi)有關(guān)系的,在下一節(jié)中就講怎么把驗(yàn)證碼顯示出來(lái)。
看完了這篇文章,相信你對(duì)“MVC+EasyUI+三層新聞網(wǎng)站如何搭建后臺(tái)登錄界面”有了一定的了解,如果想了解更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!
網(wǎng)頁(yè)題目:MVC+EasyUI+三層新聞網(wǎng)站如何搭建后臺(tái)登錄界面-創(chuàng)新互聯(lián)
當(dāng)前地址:http://chinadenli.net/article4/ddgooe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供小程序開(kāi)發(fā)、網(wǎng)站維護(hù)、面包屑導(dǎo)航、定制開(kāi)發(fā)、品牌網(wǎng)站制作、網(wǎng)站排名
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容