摘要:
jQeury顶级对象 缩写$1、$(document).ready(function(){})dom加载完成后触发window.onload只能注册一个方法页面所有内容加载完成后触发(图片,css,js都加载)缩写$(function(){})2、jQuery对象(包装集) dom对象var div = document.getElementById("id") dom对象var div = $(".class") 包装集,对dom对象包装,返回的是很多个dom对象3、jQeury选择器$("#id")$(".class&q 阅读全文
摘要:
using System;using System.Web;using System.Drawing;using System.Web.SessionState;public class ValidateCode : IHttpHandler,IRequiresSessionState { public void ProcessRequest(HttpContext context) { //System.Threading.Thread.Sleep(5000); context.Response.ContentType = "image/jpeg"; ... 阅读全文
摘要:
//点击按钮添加评论 $("#btn").click(function (){ var content =$("#txtContent").val(); var id=$("#txtId").val(); var data="content="+content+"&id="+id +"&time="+new Date().getTime(); $.post("AddComment.ashx",dat... 阅读全文
摘要:
$.getJSON("Photolist.ashx",function (msg){ //每次加载之前清空 $("#content").html(""); //动态创建table var table=$("<table id='pList'></table>"); //添加表头 table.append($("<tr><th>序号</th><th>名字</th><th>照片</th> 阅读全文
摘要:
<asp:ListView ID="ListView1" InsertItemPosition="LastItem" DataKeyNames="PId" runat="server" DataSourceID="ObjectDataSource1" > <ItemTemplate> <tr style=""> <td> <asp:Label ID="PIdLabel" runat="serv 阅读全文
摘要:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" DataSourceID="ObjectDataSource1" PageSize="2"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> </Columns> </asp 阅读全文
摘要:
<asp:DataList ID="DataList1" runat="server" CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" Width="243px" oncancelcommand="DataList1_CancelCommand" ondeletecommand="DataList1_DeleteCommand" onedit 阅读全文
摘要:
public void ProcessRequest (HttpContext context) { context.Response.ContentType = "image/jpeg"; //url传来的图片名 string img = context.Request.QueryString["img"]; if (!string .IsNullOrEmpty(img)) { //获取图片的物理路径 string path = context.Request.MapPath("... 阅读全文
摘要:
cs://repeater的databound事件 protected void RptBig_ItemDataBound(object sender, RepeaterItemEventArgs e) { //此处必须做判断,不然下面获取数据会报没有实例化或者为空 if (e.Item.ItemType== ListItemType.Item||e.Item.ItemType== ListItemType.AlternatingItem) { Repeater rptSma... 阅读全文