在掃描的時候一開始我覺得很難因為html' target='_blank'>HTML元素過多又有很多層級關(guān)系。一開始用的是 div 標(biāo)簽來表示HTML所要分配權(quán)限的元素,發(fā)現(xiàn)這個方案不行,比如把添加用戶按鈕加上DIV那么這個按鈕的樣式就變了還得調(diào)樣式我現(xiàn)在做的KS系統(tǒng)有將近100個界面,再加上現(xiàn)在的界面已經(jīng)確定好樣式,調(diào)好CSS,加上再加上DIV的話那么得重新調(diào)界面,就這個問題想了兩三天,最后我想到要不自定義一個HTML元素標(biāo)簽為: box /box 為這個標(biāo)簽加上ID和Title為: box id="AddID" Title=“添加按鈕” /box ,用這個標(biāo)簽來標(biāo)記所要分配權(quán)限的元素。這樣的話既不用更改樣式又能獲取到所要的信息。更改之后的界面后臺代碼為: 復(fù)制代碼 代碼如下: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" html xmlns="http://www.w3.org/1999/xhtml" head meta http-equiv="Content-Type" content="text/html; charset=utf-8" / meta name="Author" content="kudychen@gmail.com" / meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" / title 用戶管理——查詢用戶 /title
script src="../../js/DIV/jquery.js" /script script src="../../js/DIV/DIV.js" /script link href="../../css/admin.global.css" rel="stylesheet" type="text/css" / link href="../../css/admin.content.css" rel="stylesheet" type="text/css" /
/head body form id="Form" method="post" runat="server" %--box標(biāo)記 main 開始標(biāo)記--% box id="main" title="主要" div 當(dāng)前位置:用戶管理 - 查詢用戶 /div
div /div %--box標(biāo)記 QueryUser 開始標(biāo)記--% box id="QueryUser" title="查詢用戶" div div span /span h3 快速搜索 /h3 /div div /div div /div div /div div /div div div div label 用戶名: /label input value="" type="text" name="username" id="username" /
%--box標(biāo)記 UserList開始標(biāo)記--% box id="UserList" title="用戶列表" span div /div div /div div /div div /div div div div span /span h3 用戶列表 /h3 /div div /div
利用AJAX存入到數(shù)據(jù)庫中,一開始就遇到了問題,因為掃描界面所需要的時間太短在還沒有把第一條數(shù)據(jù)插入到數(shù)據(jù)庫的時候第二條數(shù)據(jù)就來了這樣導(dǎo)致了第一條數(shù)據(jù)的部分信息就會被第二條記錄替代了導(dǎo)致存入數(shù)據(jù)庫的數(shù)據(jù)出現(xiàn)了問題。一開始我是打算在JS那里加上個延遲,結(jié)果表名不行。然后我就在一班程序里面加入一個類似鎖的一個東西,算作延遲吧這樣存入的數(shù)據(jù)就不會錯誤了下面是代碼: 復(fù)制代碼 代碼如下: using System; using System.Collections.Generic; using System.Linq; using System.Web; using BLL.Manager.RoleUserManagerBLL; using System.Data; using System.Text; using Model; using BLL;