摘要: bind(type,[data],fn) 为每个匹配元素的特定事件绑定事件处理函数 $(“a”).bind(“click”,function(){alert(“ok”);}); live(type,[data],fn) 给所有匹配的元素附加一个事件处理函数,即使这个元素是以后再添加进来的 $(“a” 阅读全文
posted @ 2016-10-05 01:10 林十八 阅读(79) 评论(0) 推荐(0)
摘要: //C#使用正则表达式获取HTML代码中a标签里包含指定后缀的href的值,表达式如下: Regex regImg = new Regex(@"(?is)<a[^>]*?href=(['""\s]?)(?<href>([^'""\s]*\.doc)|([^'""\s]*\.docx)|([^'""\ 阅读全文
posted @ 2016-10-05 01:08 林十八 阅读(526) 评论(0) 推荐(0)
摘要: function GetQueryString(name) { var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r!=null) 阅读全文
posted @ 2016-10-05 01:07 林十八 阅读(60) 评论(0) 推荐(0)
摘要: text = Regex.Replace(text, @"(?i)(?<=<img\b[^>]*?src=\s*(['""]?))([^'""]*/)+(?=[^'""/]+\1)", "/Images/"); //text 为HTML代码段 //////////////////////////// 阅读全文
posted @ 2016-10-05 01:05 林十八 阅读(530) 评论(0) 推荐(0)