?
==============================================
jQuery使用
==============================================
1、自定義屬性的使用
<script>
$('#xwjj_i_main br[brinfo=Pd_KangQiao_Subject_Xwjj_br_1]').hide();
</script>
2、ready代碼塊
$(document).ready(function(){
?//你的代碼
});
3、簡單的特效hide()
$("a").click(function(){
??? $(this).hide("slow");//對象慢慢的消失、隱藏
??? return false; //表示不會跳轉,等同js
});
3、其他方法
$("p").toggle()//切換元素的可見狀態
$("#orderedlist tr").hover(function over ,function out ) //模仿懸停事件:為某表格所有行加上
each的用法:$("input[@type=checkbox]").each(function(i){...})
contains:$("span:contains('理')").each(function(i){...});
?
?
==============================================
==============================================
0、基礎部分
--MD5加密:
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
--圖片處理:using System.Drawing
1、DropDownList
--取消DropDownList默認的選項為第一項
this.ddlClassName.Items.Insert(0, new ListItem("請選擇...", "0"));
2、fileupload
this.fupAddFood.Attributes.Add("onchange","document.getElementById('" + this.imgAddFood.ClientID+"').src=document.getElementById('" + this.fupAddFood.ClientID + "').value");
3、TreeView
--見示例
3、DataGrid
--刪除表格選定記錄
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex];//獲得當前行標
4、DataList
--數據綁定:<ItemTemplate><%# Eval("potherinfo") %></ItemTemplate>
(DataList)OnItemCommand="DataList1_ItemCommand"
(Button)CommandName="Buy"
--if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
??????? {
??????????? ((CheckBox)e.Item.FindControl("Radio3")).Attributes.Add("onclick", "");
??????? }
5、gridview
--見示例
6、Repeater
--<%# DataBinder.Eval(Container.DataItem, "MQ_Title")%>
--<asp:Repeater ID="ProductCredit" runat="server" OnItemCommand="ProductCredit_ItemCommand" ><ItemTemplate>
--protected void ProductCredit_ItemCommand(object source, RepeaterCommandEventArgs e)
{
??????? if (e.CommandName == "Add")
??????? {
?}
}
?
?
?
?
?
?
?
?