html5 localStorage和sessionStorage
摘要:该随便来自:http://www.cnblogs.com/yuzhongwusan/archive/2011/12/19/2293347.htmlhtml5中的Web Storage包括了两种存储方式:sessionStorage和localStorage。sessionStorage用于本地存储一...
阅读全文
jQuery 回到顶部
摘要:$("XX").click(function(){$(body).animate({scrollTop:0});})
阅读全文
c# 获取客户端ip
摘要:针对HttpContext.Current.Request.UserHostAddress 如果客户使用的是代理,将获取不到真是的ip要想透过代理服务器取得客户端的真实IP地址,就要使用Request.ServerVariables("HTTP_X_FORWARDED_FOR")来读取。不过要注意的...
阅读全文
JS 新浪API获取IP归属地
摘要:http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js返回值数据格式:var remote_ip_info = {“ret”:1,”start”:”59.37.164.179″,”end”:”59.37.165.17″,”countr...
阅读全文
c#抓取网站数据
摘要:string url = "http://www.123.com/fast_view?a=1&gameId=25&areaId=0&serverId=0"; string reffer = "http://www.123.com/"; string htm...
阅读全文
sessionStorage用于分页,瀑布流和存储用户数据等
摘要:在手机网页开发中,会用到分页和瀑布流来分量显示数据。这里会遇到一个问题。当点击某条数据进入详情后,再按手机的返回键会到上一个页面,该页面是重新加载的。本人在微信里用内置的qq浏览器打开页面,window.history.back(),window.history.go()这些不说参数会重置,但a标签...
阅读全文
js瀑布流
摘要:/************************瀑布流**********************************//*滚动条在Y轴上的滚动距离*/function ScrollTop(){ var scrollTop = 0, bodyScrollTop = 0, document...
阅读全文
sql 日结
摘要:--生成日结数据====================================-- Author: -- Create date: -- Description: 资金日结-- =============================================ALTE...
阅读全文
js 去除html标签
摘要:function removeHTMLTag(str) { str = str.replace(/]*>/g,''); //去除HTML tag str = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白 //str = str.repl...
阅读全文
c# 去除文本的html标签
摘要:1 public static string ContentReplace(string input) 2 { 3 input = Regex.Replace(input, @"]*)>", "", RegexOptions.IgnoreCase); 4 ...
阅读全文
jQuery 数据滚动(上下)
摘要:setInterval(function() { jq('.sjbg02 li:first').animate({ 'height': '0', 'opacity': '0' }, 'slow', function() { jq(this).removeAttr('style')...
阅读全文
jQuery 图片随滚动条滚动加载
摘要:1 2 3 4 JQurey.LazyLoad.js插件使用说明-http://www.jb51.net 5 8 9 10 11 1、将文件解压,将Js文件夹所有文件上传至网站根目录,目录形式为:12 http://www.jb51.net/Js/lazyload/grey.gif13 ...
阅读全文
sql 指定范围 获取随机数
摘要:DECLARE @nMinimumCount INT= 1DECLARE @nMaximumCount INT= 100SELECT abs(CHECKSUM(NEWID()))%(@nMaximumCount+ 1-@nMinimumCount)+@nMinimumCount@nMinimumC...
阅读全文
js 时间格式化
摘要:开发的过程中经常会碰到时间格式化的事,针对那些时间戳,2015-05-05,2015/05/05等都能很好的转换成你想要的格式function FormatDate(strDate, strFormat){ if (!strDate) return; if (!strFormat...
阅读全文
js自写字符串 append 方法
摘要:function stringbuilder(){ this.arr = new Array(); this.append=function(str) { this.arr.push(str); } this.tostring = function() { ...
阅读全文
js滚动条
摘要:/*滚动条在Y轴上的滚动距离*/function ScrollTop(){ var scrollTop = 0, bodyScrollTop = 0, documentScrollTop = 0; if (document.body) { bodyScrollTop ...
阅读全文
sql 按时间二段排序
摘要:业务需用为数据按倒序排序,当天数据排在以往日期前面,但当天数据需按小时进行升序排列select *from( select vcTitle,dtBeginDate,case when dtBeginDate<=getdate() then 1 else 2 end tt from TableA )...
阅读全文
C#,js数据排序及其操作
摘要:List listint=new List{2,1,7,3,8,5,4,6};listint.Sort((x, y) => x - y);var array = newArray()array.sort(function(x, y) {return Number(x[1]) - Number(y[1...
阅读全文