2018年4月26日

摘要: 一、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 (删除表):删 阅读全文
posted @ 2018-04-26 18:02 幽默是一种心情 阅读(4946) 评论(0) 推荐(0) 编辑
 
摘要: 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" 阅读全文
posted @ 2018-04-26 17:52 幽默是一种心情 阅读(10452) 评论(0) 推荐(0) 编辑
 
摘要: window.location.href = location.href; 方法一: $(window).scrollTop(0); 方法二:$('html ,body').animate({ scrollTop: -10 }, 300); 阅读全文
posted @ 2018-04-26 17:44 幽默是一种心情 阅读(4370) 评论(0) 推荐(0) 编辑
 
摘要: html <a href="javascript:history.go(-1);location.reload()">返回上一页重载页面,本地刷新</a> <a href="#" onclick="self.location=document.referrer;">返回并刷新</a> Javascr 阅读全文
posted @ 2018-04-26 17:37 幽默是一种心情 阅读(313) 评论(0) 推荐(0) 编辑
 
摘要: 1.获取: $('#img')[0].src 2.设置:$('#img').attr("src", data.CodeUrl); 阅读全文
posted @ 2018-04-26 15:00 幽默是一种心情 阅读(7663) 评论(0) 推荐(0) 编辑
 
摘要: 1.填写银行卡号每隔4位数字加一个空格 Regex.Replace(dic["BankCardNo"].ToString(), @"(\d{4}(?!$))", "$1 ") 2.手机号用*代替: dic["AlipayAccount"].ToString().Substring(0,3)+ "** 阅读全文
posted @ 2018-04-26 14:49 幽默是一种心情 阅读(1146) 评论(0) 推荐(0) 编辑
 
摘要: 1. onchange事件与onpropertychange事件的区别: onchange事件在内容改变(两次内容有可能相等)且失去焦点时触发; onpropertychange事件是实时触发,每增加或删除一个字符就会触发,通过js改变也会触发该事件,但是该事件是IE专有。 2. oninput事件 阅读全文
posted @ 2018-04-26 14:47 幽默是一种心情 阅读(1381) 评论(0) 推荐(0) 编辑
 
摘要: var arr = list[i]["Tag"].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); 阅读全文
posted @ 2018-04-26 14:34 幽默是一种心情 阅读(332) 评论(0) 推荐(0) 编辑
 
摘要: pushHistory(); window.addEventListener("popstate", function (e) { if (orderid != "") { window.location.href = "/wap/self/orderinfo.aspx?id=" + orderid 阅读全文
posted @ 2018-04-26 14:33 幽默是一种心情 阅读(6360) 评论(1) 推荐(0) 编辑
 
摘要: 1. $("#tanchuBg").css("display") 2. $("#tanchuBg").is(":visible") 3. $("#tanchuBg").is(":hidden") 例: if($("#tanchuBg").is(":hidden")) { alert("隐藏了") } 阅读全文
posted @ 2018-04-26 14:24 幽默是一种心情 阅读(981) 评论(0) 推荐(0) 编辑
 
摘要: 返回两个日期之间的时间间隔。 语法DateDiff(interval, date1, date2 [,firstdayofweek][, firstweekofyear]])DateDiff 函数的语法有以下参数: 参数 描述 interval 必选。字符串表达式,表示用于计算 date1 和 da 阅读全文
posted @ 2018-04-26 14:14 幽默是一种心情 阅读(3328) 评论(0) 推荐(0) 编辑
 
摘要: 1:在a标签里加入js控制,当a标签被聚焦时,强制取消焦点,这时候a标签自然不会有虚线框。 <a href="#" onfocus="this.blur();">这里设置聚焦时触发blur();强制取消焦点。 2:在a标签里嵌套其他标签,比如span 或者var等等,把内容放在被嵌套的标签里。这时候 阅读全文
posted @ 2018-04-26 11:45 幽默是一种心情 阅读(756) 评论(0) 推荐(0) 编辑
 
摘要: Global文件: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Security;using System.Web.SessionState;nam 阅读全文
posted @ 2018-04-26 10:53 幽默是一种心情 阅读(3072) 评论(0) 推荐(0) 编辑
 
摘要: 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) 阅读全文
posted @ 2018-04-26 10:50 幽默是一种心情 阅读(324) 评论(0) 推荐(0) 编辑
 
摘要: HTML: <form id="form1"> <div id="t_border"> <!--startprint--> <div id="first"> <span id="title">****汽车服务连锁施工单</span> </div> <table id="TableTitle" sty 阅读全文
posted @ 2018-04-26 10:26 幽默是一种心情 阅读(1268) 评论(0) 推荐(0) 编辑