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 style="height:20px"></div> <table> <tr> <td style="width:20px"></td> <td>用戶名:</td> <td><input type="text"class="easyui-textbox" id="txtName" name="txtName"/></td> <td><span id="spanName" style="color:red"></span></td> </tr> <tr style="height:10px"></tr> <tr> <td style="width:20px"></td> <td>密 碼:</td> <td><input type="password/"class="easyui-textbox"id="txtPwd" name="txtPwd"></td> <td><span id="spanPwd" style="color:red"></span></td> </tr> <tr style="height:10px"></tr> <tr> <td style="width:20px"></td> <td>驗(yàn)證碼:</td> <td><input type="text"class="easyui-textbox" id="txtVcode" name="txtVcode"/></td> <td><span id="spanVcode"style="color:red"></span></td> </tr> <tr style="height:10px"></tr> <tr> <td style="width:20px"></td> <td><img id="image" src="" style="float: left; height: 24px;" /></td> <td><a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" id="changeVcode">看不清,換一張</a></td> </tr> </table> </div> <div style="height:10px"></div> <div data-options="region:'south',border:false" style="text-align:center;padding:5px 0 0;"> <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" rel="external nofollow" rel="external nofollow" id="btnOk" style="width:80px">登錄</a> </div> </div> </body> </html>
運(yùn)行的結(jié)果圖:
這里驗(yàn)證碼的圖片沒有顯示出來,這是沒有關(guān)系的,在下一節(jié)中就講怎么把驗(yàn)證碼顯示出來。
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- MVC+EasyUI+三層新聞網(wǎng)站建立 建站準(zhǔn)備工作(一)
- MVC+EasyUI+三層新聞網(wǎng)站建立 主頁(yè)布局的方法(五)
- MVC+EasyUI+三層新聞網(wǎng)站建立 實(shí)現(xiàn)登錄功能(四)
- MVC+EasyUI+三層新聞網(wǎng)站建立 驗(yàn)證碼生成(三)
- 一步步打造簡(jiǎn)單的MVC電商網(wǎng)站BooksStore(2)
- 一步步打造簡(jiǎn)單的MVC電商網(wǎng)站BooksStore(1)
- MVC4制作網(wǎng)站教程第四章 更新欄目4.3
- MVC4制作網(wǎng)站教程第四章 瀏覽欄目4.2
- MVC4制作網(wǎng)站教程第四章 添加欄目4.1
- MVC+EasyUI+三層新聞網(wǎng)站建立 tabs標(biāo)簽制作方法(六)
相關(guān)文章
.Net?ORM?訪問?Firebird?數(shù)據(jù)庫(kù)的方法
這篇文章簡(jiǎn)單介紹了在?.net6.0?環(huán)境中使用?FreeSql?對(duì)?Firebird?數(shù)據(jù)庫(kù)的訪問,目前?FreeSql?還支持.net?framework?4.0?和?xamarin?平臺(tái)上使用,對(duì).Net?ORM?訪問?Firebird?數(shù)據(jù)庫(kù)相關(guān)知識(shí)感興趣的朋友一起看看吧2022-07-07Asp.net中安全退出時(shí)清空Session或Cookie的實(shí)例代碼
網(wǎng)站中點(diǎn)擊退出,如果僅僅是重定向到登錄/出頁(yè)面,此時(shí)在瀏覽器地址欄中輸入登錄后的某個(gè)頁(yè)面地址如主頁(yè),你會(huì)發(fā)現(xiàn)不用登錄就能訪問,這種退出并不安全了,下面通過本文給大家介紹安全退出時(shí)清空Session或Cookie的實(shí)例代碼2016-11-11IIS 瀏覽aspx頁(yè)面出現(xiàn)無法顯示XML頁(yè)的解決方法分享
這篇文章介紹了IIS 瀏覽aspx頁(yè)面出現(xiàn)無法顯示XML頁(yè)的解決方法,有需要的朋友可以參考一下2013-11-11asp.net core razor自定義taghelper的方法
這篇文章主要介紹了asp.net core razor自定義taghelper的方法,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-09-09獲取客戶端IP地址c#/vb.net各自實(shí)現(xiàn)代碼
項(xiàng)目要求獲取客戶端的IP地址,分析并且用c#與vb各自實(shí)現(xiàn)了此要求,有需要的朋友可以了解下啊,希望本文對(duì)你們有所幫助2013-01-01為TextBox裝飾水印與(blur和focus)事件應(yīng)用
為了界面的美觀,有些時(shí)候可能需要為文本框(TextBox)裝飾個(gè)水印;它有兩種狀態(tài),一是blur和focus。因此,我們可以在Javascript寫兩個(gè)事件,感興趣的朋友可以了解下2013-01-01.Net6.0+Vue3實(shí)現(xiàn)數(shù)據(jù)簡(jiǎn)易導(dǎo)入功能全過程
最近在用VUE做一個(gè)數(shù)據(jù)導(dǎo)入的功能,下面這篇文章主要給大家介紹了關(guān)于使用.Net6.0+Vue3實(shí)現(xiàn)數(shù)據(jù)簡(jiǎn)易導(dǎo)入功能的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),需要的朋友可以參考下2022-09-09.NET C#創(chuàng)建WebService服務(wù)簡(jiǎn)單實(shí)例
這篇文章主要為大家詳細(xì)介紹了.NET C# 創(chuàng)建WebService服務(wù)簡(jiǎn)單實(shí)例,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-05-05