MVC+EasyUI+三層新聞網(wǎng)站建立 后臺(tái)登錄界面的搭建(二)
新聞網(wǎng)站建立,后臺(tái)登錄界面的搭建
首先我們?cè)贑ontrollers里面新添加一個(gè)控制器就叫LoginController,右鍵點(diǎn)擊Controllers添加控制器就可以了(注意后面一定是Controller結(jié)尾,這是一種約定)

其次:右鍵點(diǎn)擊index建立Index視圖。(不選擇使用母版頁)

現(xiàn)在我們就可以在Index視圖中設(shè)計(jì)我們的登錄頁面了。
這里需要我們引入幾個(gè)Css樣式和JS文件

簡單的進(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)證碼顯示出來。
以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- MVC+EasyUI+三層新聞網(wǎng)站建立 建站準(zhǔn)備工作(一)
- MVC+EasyUI+三層新聞網(wǎng)站建立 主頁布局的方法(五)
- MVC+EasyUI+三層新聞網(wǎng)站建立 實(shí)現(xiàn)登錄功能(四)
- MVC+EasyUI+三層新聞網(wǎng)站建立 驗(yàn)證碼生成(三)
- 一步步打造簡單的MVC電商網(wǎng)站BooksStore(2)
- 一步步打造簡單的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微信開發(fā)之PC 端微信掃碼注冊(cè)和登錄功能實(shí)現(xiàn)
這篇文章主要介紹了.NET微信開發(fā)之PC 端微信掃碼注冊(cè)和登錄功能實(shí)現(xiàn)的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-09-09
ASP.NET中MVC傳遞數(shù)據(jù)的幾種形式總結(jié)
這篇文章主要介紹了ASP.NET中MVC傳遞數(shù)據(jù)的幾種形式,以實(shí)例形式較為詳細(xì)的分析總結(jié)了MVC數(shù)據(jù)傳遞的相關(guān)技巧與注意事項(xiàng),具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-10-10
ASP.NET MVC中異常Exception攔截的深入理解
異常信息的處理在程序中非常重要, 在asp.net mvc中提供異常屬性攔截器進(jìn)行對(duì)異常信息的處理,下面這篇文章主要給大家介紹了關(guān)于ASP.NET MVC中異常Exception攔截的相關(guān)資料,需要的朋友可以參考下2018-07-07
asp.net 在客戶端顯示服務(wù)器端任務(wù)處理進(jìn)度條的探討
由于 HTTP 協(xié)議本身的無狀態(tài)性,B/S結(jié)構(gòu)的程序無法像C/S程序那樣,實(shí)時(shí)顯示程序處理的進(jìn)度。搜索一下網(wǎng)上,一般都是采用靜態(tài)變量保存程序執(zhí)行進(jìn)度的方法實(shí)現(xiàn),但是,這種方法是完全錯(cuò)誤的,在并發(fā)的情況下,多個(gè)用戶訪問一個(gè)程序,會(huì)造成混亂。2009-09-09
asp.net下用url重寫URLReWriter實(shí)現(xiàn)任意二級(jí)域名的方法
asp.net下用url重寫URLReWriter實(shí)現(xiàn)任意二級(jí)域名的方法...2007-03-03
關(guān)于中g(shù)ridview 字符串截取的方法
在Gridview中,如果你的某一列字符串的長度過長,不做處理的話.那么將顯示的奇丑無比,可以采取設(shè)置樣式,將其顯示為定長,可以在點(diǎn)擊查看的時(shí)候,在另一個(gè)頁面對(duì)其進(jìn)行顯示2013-06-06
asp.net頁面狀態(tài)管理cookie和服務(wù)器狀態(tài)管理Session
Session變量將在服務(wù)器為每個(gè)連接建立一個(gè)字典對(duì)象,使用的是服務(wù)端保存。Cookie可能會(huì)有一個(gè)按照年月日來判斷的作廢日期,而Session級(jí)別的變量在連接超時(shí)后就作廢2010-09-09
asp.net調(diào)用系統(tǒng)設(shè)置字體文本框的方法
這篇文章主要介紹了asp.net調(diào)用系統(tǒng)設(shè)置字體文本框的方法,包括設(shè)置文本字體樣式和大小,需要的朋友可以參考下2014-09-09

