2012年10月25日

输入框有提示,点击消失,字数限制

摘要: <input name="textfield" type="text" maxlength="20" value="请输入文字.." onfocus="if (value =='请输入文字..'){value =''}" onblur="if (value ==''){value='请输入文字..'}" /><br /><textarea cols="50" ro 阅读全文

posted @ 2012-10-25 13:57 缘来 阅读(323) 评论(0) 推荐(0)

2012年9月11日

遍历文本中所有的网址添加超链接

摘要: public string maindomain(string url) { // [u4e00-u9fa5] 中文 ^\w+$ Regex regex = new Regex( // @"(((http|https):\/\/)?[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])+[A-Za-z0-9]+$?)", @"(((http|https):\/\/)?[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\ 阅读全文

posted @ 2012-09-11 14:05 缘来 阅读(274) 评论(0) 推荐(0)

可以定位到当前选项卡的菜单效果

摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Oauth4Web.WebForm1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 阅读全文

posted @ 2012-09-11 14:02 缘来 阅读(353) 评论(0) 推荐(0)

2012年9月6日

网址URL正则表达式

摘要: var strRegex = "^((https|http|ftp|rtsp|mms)?://)" + "?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?" //ftp的user@ + "(([0-9]{1,3}.){3}[0-9]{1,3}" // IP形式的URL- 199.194.52.184 + "|" // 允许IP和DOMAIN(域名) + "([0-9a-z_!~*'()-]+.)*&qu 阅读全文

posted @ 2012-09-06 14:43 缘来 阅读(608) 评论(0) 推荐(0)

2012年7月13日

移除 CheckBoxList 所有Item

摘要: for (int i=chkkeywordList.Items.Count - 1; i >=0 ; i--) { chkkeywordList.Items.Remove(chkkeywordList.Items[i]); } 每次删除时Item 的index会变化所以要从后往前删 阅读全文

posted @ 2012-07-13 10:18 缘来 阅读(171) 评论(0) 推荐(0)

2012年3月12日

dataSet 分页

摘要: public static DataSet SplitDataSet(DataSet ds, int pageSize, int pageIndex) { DataSet vds = new DataSet(); vds = ds.Clone(); int fromIndex = pageSize * (pageIndex - 1); int toIndex = pageSize * pageIndex - 1; for (int i = fromIndex; i <= toIndex; i++) { if (i >= ds.Tables[0].Rows.Count) break; 阅读全文

posted @ 2012-03-12 14:57 缘来 阅读(137) 评论(0) 推荐(0)

2012年1月12日

ASP.NET 页面传值中文乱码问题

摘要: 代码如下:传值前台页面:<a href='http://www.cnblogs.com/Common/Download.aspx?url=<%#Eval("DFILE_URL") %>&fileName=<%#Eval("DFILE_NAME")%>'接收值页面后台代码:string fileName = Request.QueryString["fileName"].ToString();如果fileName=<%#Eval("DFILE_NAME")% 阅读全文

posted @ 2012-01-12 14:25 缘来 阅读(481) 评论(0) 推荐(0)

2011年11月16日

Tab 选项卡实现

摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns=&qu 阅读全文

posted @ 2011-11-16 13:30 缘来 阅读(169) 评论(0) 推荐(0)

2011年10月20日

javascript 图片切换

摘要: <!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> <title></title> <script src="JavaScript/jquery.js" type= 阅读全文

posted @ 2011-10-20 10:44 缘来 阅读(124) 评论(0) 推荐(0)

2011年10月19日

仿Igoogle模块拖动

摘要: <!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> <title>据说是Google首页的网页模块拖动代码</title> <script type="text/javas 阅读全文

posted @ 2011-10-19 16:46 缘来 阅读(303) 评论(0) 推荐(0)

导航