上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页
摘要: 1创建jQuery插件,基本的格式是上面这段代码:(function ($){//add code here})(jQuery) 我们怎么理解? 第一步:function ($){}定义了一个匿名的函数,有一个参数,$是参数名,和其他的参数名没什么区别。 第二步:(function ($){})(jQuery) 我们要执行一个匿名函数的时候,通常用var func = function ($) { },然后func(参数)这样的形式。这里func就是一个Function对象。但更简洁的(function ($) {}),这时用括号,也同样返回括号的内容,也是一个function对象。我们再执行 阅读全文
posted @ 2012-12-20 11:06 大数据工程师康爸 阅读(452) 评论(0) 推荐(0)
摘要: 1,有多个checkbox,选出第一个选中的checkbox: $("#btn").click(function () { //选择checkbox前面加冒号,选中属性前加冒号 var checks = $("#table2 :checkbox:checked"); if (checks.length > 0) { //eq是第几个,从0开始 var sid = checks.eq(0).parent().parent().attr("id"); ... 阅读全文
posted @ 2012-12-17 15:30 大数据工程师康爸 阅读(1575) 评论(0) 推荐(0)
摘要: 1,我在form之外添加了一个button,结果提示错误:“Button”的控件“PreButton”必须放在具有 runat=server 的窗体标记内。解决办法: 在页面中重写Page基类的VerifyRenderingInServerForm方法 public override void VerifyRenderingInServerForm(Control control) { // Confirms that an HtmlForm control is rendered for }来源:http://www.cnblogs.com/littleangel7/articles... 阅读全文
posted @ 2012-12-14 15:55 大数据工程师康爸 阅读(331) 评论(0) 推荐(1)
摘要: 1,ime-mode共有4个值,如下,前两个可以输入汉字,后两个不能输入汉字。 <input type="text" name="textfield" style="ime-mode:auto " /> <input type="text" name="textfield" style="ime-mode:active " /> <input type="text" name="textfield" sty 阅读全文
posted @ 2012-12-13 15:33 大数据工程师康爸 阅读(297) 评论(0) 推荐(0)
摘要: 1,写到类中,用到DataContractJsonSerializer,需要引用using System.Runtime.Serialization; 使用例子: 输出结果是:恭喜您,发布成功。 obj.Msg的值是使用unicode编码表示的汉字。 阅读全文
posted @ 2012-12-04 16:58 大数据工程师康爸 阅读(336) 评论(0) 推荐(0)
摘要: 下面是转载:http://www.cnblogs.com/duohahawuwu/archive/2011/04/20/2021975.html最近发现抓取网页数据的工作越来越多了,抓取技术,正则表达式,各种麻烦,这次又遇到了cookie的问题。首先痛恨一下那些靠cookie来变换网页内容的网站,嘿嘿在网上找了一些资料,最后整理出来了结论说结论之前先说一下cookie的层次关系,在.net中cookie的大小关系如下CookieContainer--CookieCollection--Cookie ,其中我们使用的HttpWebRequest使用的正式第一级别也就是CookieContaine 阅读全文
posted @ 2012-12-03 11:42 大数据工程师康爸 阅读(859) 评论(0) 推荐(0)
摘要: 1, 2, 总结: 阅读全文
posted @ 2012-11-23 11:21 大数据工程师康爸 阅读(287) 评论(0) 推荐(0)
摘要: 1,提取刷新时间 #region 根据刷新时间判断是否发布或者刷新成功 //匹配源: <p>刷新时间:2012-11-22 16:30</p> //需要获取: 2012-11-22 16:30 private bool TestRefreshTime(string input) { bool flag = false; //正则 \d+至少一个数字,\-转义连接符,\s空格,()分组 Regex regex = new Regex(@"刷新时间:... 阅读全文
posted @ 2012-11-23 10:49 大数据工程师康爸 阅读(519) 评论(0) 推荐(0)
摘要: 下面是分页存储过程:create proc [dbo].[proc_value_page]@pageIndex int,@pageSize int,@pageCount int outputasdeclare @totalRecord intselect @totalRecord=count(*) from dbo.spt_valuesset @pageCount=ceiling(@totalRecord*1.0/@pageSize)select * from(select row_number() over(order by number asc) as num,* from dbo.sp. 阅读全文
posted @ 2012-11-22 21:23 大数据工程师康爸 阅读(971) 评论(0) 推荐(0)
摘要: 下面是从Yes515拷贝过来的代码,还没有详细分析,备用 function addCookie(){ // 加入收藏夹 if (document.all){ window.external.addFavorite(location.href, document.title); }else if (window.sidebar){ window.sidebar.addPanel(document.title, location.href , ""); } } function se... 阅读全文
posted @ 2012-11-22 18:18 大数据工程师康爸 阅读(209) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页