Adobe出品(支持IOS,android,web调用)免费插件编辑图片
摘要:<head runat="server"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>图片编辑</title> <script src="js/jquery-1.7.2.js"></scrip
阅读全文
C#后台正则表达式
摘要:static Regex RegPhone = new Regex(@"^((1[34578][0-9]{1}))\d{8}"); static Regex RegNumber = new Regex(@"^[0-9]+$"); static Regex RegNumberSign = new Re
阅读全文
Layer 弹出层抖动问题
摘要:layer.open({ type: 2, anim: 5,//加上anim,渐显 title: '品牌列表', shadeClose: false, maxmin: true, //开启最大化最小化按钮 area: ['800px', '100%'], content: '/Admin/crumb
阅读全文
JS中子页面父页面方法 变量相互调用
摘要:(1)子页面调用父页面的方法或者变量: window.parent.方法()或者变量名 例如:想在子页面中得到 id 为 aaa 的文本框的值 window.parent.$("#aaa").val();//这种写法的前提是引用了jquery window.parent.getElementById
阅读全文
layer最大话.最小化.还原回调方法
摘要:layer.open({ type: 1, title: ‘在线调试‘, content: ‘这里是内容‘, maxmin: true, //开启最大,最小,还原按钮,只有type为1和2时,才能设置 full: function() { //点击最大化后的回调函数 console.log(‘这个是
阅读全文
避免浏览器缓存JS
摘要:有时候更改了JS代码,但是浏览器内容不变,这样<script src="Scripts/myjs/Master.js?v"></script>引入JS就可以避免缓存
阅读全文
JS图片宽度自适应移动端
摘要:$(function(){ $("#d-intro").find("img").each(function () { $(this).removeAttr("width").removeAttr("height").removeAttr("style"); //if ($(this).next("i
阅读全文
SQL语句中drop、truncate和delete的用法
摘要:一、SQL中的语法 1、drop table dbo.Sys_Test 2、truncate table dbo.Sys_Test 3、delete from dbo.Sys_Test where test='test' 二、drop,truncate,delete区别 1、drop (删除表):删
阅读全文
C#求百分比
摘要:double a=50; double b=100; 没有小数部分Label1.Text = (a / (a+b)).ToString("0%") 两位小数Label2.Text = (a / (a+b)).ToString("P") ToString("0.00%"); ToString("P3"
阅读全文
JS刷新后回到页面顶部
摘要:window.location.href = location.href; 方法一: $(window).scrollTop(0); 方法二:$('html ,body').animate({ scrollTop: -10 }, 300);
阅读全文
JS返回上一页并刷新代码整理
摘要:html <a href="javascript:history.go(-1);location.reload()">返回上一页重载页面,本地刷新</a> <a href="#" onclick="self.location=document.referrer;">返回并刷新</a> Javascr
阅读全文
jQuery 获取设置图片 src 的路径
摘要:1.获取: $('#img')[0].src 2.设置:$('#img').attr("src", data.CodeUrl);
阅读全文
C#银行卡号每隔4位数字加一个空格
摘要:1.填写银行卡号每隔4位数字加一个空格 Regex.Replace(dic["BankCardNo"].ToString(), @"(\d{4}(?!$))", "$1 ") 2.手机号用*代替: dic["AlipayAccount"].ToString().Substring(0,3)+ "**
阅读全文
input标签内容改变时触发事件
摘要:1. onchange事件与onpropertychange事件的区别: onchange事件在内容改变(两次内容有可能相等)且失去焦点时触发; onpropertychange事件是实时触发,每增加或删除一个字符就会触发,通过js改变也会触发该事件,但是该事件是IE专有。 2. oninput事件
阅读全文
C#的Split()方法
摘要:var arr = list[i]["Tag"].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
阅读全文
JS使用 popstate 事件监听物理返回键
摘要:pushHistory(); window.addEventListener("popstate", function (e) { if (orderid != "") { window.location.href = "/wap/self/orderinfo.aspx?id=" + orderid
阅读全文
JQ判断div是否隐藏
摘要:1. $("#tanchuBg").css("display") 2. $("#tanchuBg").is(":visible") 3. $("#tanchuBg").is(":hidden") 例: if($("#tanchuBg").is(":hidden")) { alert("隐藏了") }
阅读全文
SQL Server DATEDIFF() 函数
摘要:返回两个日期之间的时间间隔。 语法DateDiff(interval, date1, date2 [,firstdayofweek][, firstweekofyear]])DateDiff 函数的语法有以下参数: 参数 描述 interval 必选。字符串表达式,表示用于计算 date1 和 da
阅读全文
取消a或input标签聚焦后出现虚线框
摘要:1:在a标签里加入js控制,当a标签被聚焦时,强制取消焦点,这时候a标签自然不会有虚线框。 <a href="#" onfocus="this.blur();">这里设置聚焦时触发blur();强制取消焦点。 2:在a标签里嵌套其他标签,比如span 或者var等等,把内容放在被嵌套的标签里。这时候
阅读全文
C#定时任务
摘要:Global文件: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Security;using System.Web.SessionState;nam
阅读全文
C# 保留N位小数
摘要:1.只要求保留N位不四舍五入 float f = 0.55555f; int i =(int)(f * 100); f = (float)(i*1.0)/100; 2.保留N位,四舍五入 . decimal d= decimal.Round(decimal.Parse( "0.55555 "),2)
阅读全文
C#打印单据
摘要:HTML: <form id="form1"> <div id="t_border"> <!--startprint--> <div id="first"> <span id="title">****汽车服务连锁施工单</span> </div> <table id="TableTitle" sty
阅读全文
SQL语句创建函数
摘要:先create,再alter alter function fuc (@userid int,@strWhere varchar(max),@strWhere2 varchar(max) ) returns decimal(18,2 )asbegin declare @useridlist varc
阅读全文
SVN检出新项目
摘要:1.新建文件夹SourseCode -->打开SourseCode文件夹,右键空白处 > 选择SVN Checkout --选择URL of repository,选择Checkout directory >确定
阅读全文