jquery源码2Word文档格式.docx

上传人:b****6 文档编号:21966334 上传时间:2023-02-02 格式:DOCX 页数:25 大小:20.43KB
下载 相关 举报
jquery源码2Word文档格式.docx_第1页
第1页 / 共25页
jquery源码2Word文档格式.docx_第2页
第2页 / 共25页
jquery源码2Word文档格式.docx_第3页
第3页 / 共25页
jquery源码2Word文档格式.docx_第4页
第4页 / 共25页
jquery源码2Word文档格式.docx_第5页
第5页 / 共25页
点击查看更多>>
下载资源
资源描述

jquery源码2Word文档格式.docx

《jquery源码2Word文档格式.docx》由会员分享,可在线阅读,更多相关《jquery源码2Word文档格式.docx(25页珍藏版)》请在冰豆网上搜索。

jquery源码2Word文档格式.docx

});

});

链式操作:

/*varoDiv=$('

);

oDiv.html('

hello'

oDiv.css('

background'

'

red'

oDiv.click(function(){

alert(123);

*/

).html('

).css('

建议熟悉了,再写链式写法;

取值和赋值合体:

赋值和取值用的同一种方法,只不过是通过有没有参数来决定是取值还是赋值;

//oDiv.innerHTML='

;

//赋值

//alert(oDiv.innerHTML);

//取值

//$('

//alert($('

).html());

css('

width'

200px'

)//设置width是200px;

)//获取width的值;

取值和赋值:

获取的时候只能获取一个,赋值的时候赋值到所有的;

li'

//当一组元素的时候,取值是一组中的第一个;

会弹出内容:

aaa

//当一组元素的时候,赋值是一组中的所有元素

$()下的常用方法

attr()

//alert($('

div'

).attr('

title'

));

获取title属性

456'

//设置title

class'

box'

//设置class

(二)C#源码

usingSystem;

usingSystem.Collections.Generic;

usingSystem.Data;

usingSystem.Linq;

usingSystem.Text;

namespaceIDAL

{

publicinterfaceISQLAbl

{

///<

summary>

///连接数据库

/summary>

paramname="

sql"

>

<

/param>

returns>

/returns>

boolConnect(Stringsql);

//连接数据库

boolOpen();

//打开数据库

boolClose();

//关闭数据库

DataTableGetTable(longgetTableID);

DataTableGetTable(List<

long>

getTableID);

DataTableGetTable(stringgetsWhere);

DataTableGetTable(stringgetsWhere,List<

String>

keys,List<

object>

values);

DataTableGetTable(stringgetsWhere,inttop);

DataTableGetTable(stringgetsWhere,stringorders);

DataTableGetTable(List<

getTableID,stringorders);

DataTableGetTable(stringgetsWhere,inttop,stringorders);

boolEdit(longEidtID,DataTableeditTable);

//编辑ID

boolEdit(StringeditWhere,DataTableeditTable);

longEdit(List<

editIds,DataTableeditTable);

//编辑多ID

boolAdd(DataTableaddTable);

//增加表单

longDUI(stringcmd);

objectGetObject(stringcmd);

boolDel(longdelID);

longDel(List<

delListID);

longDel(stringdelWhere);

}

}

usingMaticsoft.Common;

usingMaticsoft.Model;

namespaceMaticsoft.BLL

///ArticleClass

publicpartialclassArticleClass

privatereadonlyMaticsoft.DAL.ArticleClassdal=newMaticsoft.DAL.ArticleClass();

publicArticleClass()

{}

#regionBasicMethod

///<

///得到最大ID

publicintGetMaxId()

returndal.GetMaxId();

///是否存在该记录

publicboolExists(intid)

returndal.Exists(id);

///增加一条数据

publicboolAdd(Maticsoft.Model.ArticleClassmodel)

returndal.Add(model);

///更新一条数据

publicboolUpdate(Maticsoft.Model.ArticleClassmodel)

returndal.Update(model);

///删除一条数据

publicboolDelete(intid)

returndal.Delete(id);

publicboolDeleteList(stringidlist)

returndal.DeleteList(idlist);

///得到一个对象实体

publicMaticsoft.Model.ArticleClassGetModel(intid)

returndal.GetModel(id);

///得到一个对象实体,从缓存中

publicMaticsoft.Model.ArticleClassGetModelByCache(intid)

stringCacheKey="

ArticleClassModel-"

+id;

objectobjModel=Maticsoft.Common.DataCache.GetCache(CacheKey);

if(objModel==null)

try

objModel=dal.GetModel(id);

if(objModel!

=null)

intModelCache=Maticsoft.Common.ConfigHelper.GetConfigInt("

ModelCache"

Maticsoft.Common.DataCache.SetCache(CacheKey,objModel,DateTime.Now.AddMinutes(ModelCache),TimeSpan.Zero);

catch{}

return(Maticsoft.Model.ArticleClass)objModel;

///获得数据列表

publicDataSetGetList(stringstrWhere)

returndal.GetList(strWhere);

///获得前几行数据

publicDataSetGetList(intTop,stringstrWhere,stringfiledOrder)

returndal.GetList(Top,strWhere,filedOrder);

publicList<

Maticsoft.Model.ArticleClass>

GetModelList(stringstrWhere)

DataSetds=dal.GetList(strWhere);

returnDataTableToList(ds.Tables[0]);

DataTableToList(DataTabledt)

List<

modelList=newList<

();

introwsCount=dt.Rows.Count;

if(rowsCount>

0)

Maticsoft.Model.ArticleClassmodel;

for(intn=0;

n<

rowsCount;

n++)

model=dal.DataRowToModel(dt.Rows[n]);

if(model!

modelListGiSpx.Add(model);

returnmodelList;

///分页获取数据列表

publicintGetRecordCount(stringstrWhere)

returndal.GetRecordCount(strWhere);

publicDataSetGetListByPage(stringstrWhere,stringorderby,intstartIndex,intendIndex)

returndal.GetListByPage(strWhere,orderby,startIndex,endIndex);

//publicDataSetGetList(intPageSize,intPageIndex,stringstrWhere)

//{

//returndal.GetList(PageSize,PageIndex,strWhere);

//}

#endregionBasicMethod

#regionExtensionMethod

Maticsoft.Common.DataCache.SetCache(CacheKey,

objModel,DateTime.Now.AddMinutes(ModelCache),TimeSpan.Zero);

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 党团工作 > 入党转正申请

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1