行业动态/ 2020-02-25
seajs加载jquery实例
html源代码如下: <script src='sea-module/sea.js'></script>
Learn More
js操作json对象
<!doctype html> <html> <head> <meta http-equiv="Content-Type" content=
bxslider触屏轮播
bxslider触屏轮播 首先调用对应js文件:<script type="text/javascript" src="js/jquery.js">&l
行业动态/ 2020-02-14
青浦小程序开发,小程序轮播案例2
<!--index.wxml--><view class="container"> <swiper indicator-dots="true" autopla
行业动态/ 2020-02-13
上海小程序开发,小程序轮播案例
====index.wxml文件代码显示====<view class="container"><swiper indicator-dots="{{indicatorDots}}&
行业动态/ 2019-05-16
asp.net 母版嵌套,更新title内容
母版页A(homeMP.master)母版页B(innerMP.master)内容页(about.html)内容页继承于母版页B,母版B继承于母版AinnerMP masterpage2
行业动态/ 2018-12-11
在同一个空间里,根据不同域名对应不同的网站的开发
asp.neturl= HttpContext.Current.Request.Url.Host; switch (url) { &
行业动态/ 2018-11-14
.net post中文参数 utf-8 编码
string _content="中文字符";Encoding myEncoding = Encoding.GetEncoding("UTF-8");string contents=Syste
行业动态/ 2018-10-26
内容页获得母版页的实体类
因为内容页比母版页先加载,所以母版页里的实体不能在Page_Load中赋值。应该重写OnInit,所以在母版页中的cs重写: protect
行业动态/ 2018-06-27
mysql创建二表视图
create view view_haiBaoAndUsers(haibaoID,nickname,headimgurl,dates,shared) as select haibao.ID,users.nickname,users.head
行业动态/ 2018-06-20
图片base64格式,另存为图片
图片的base64位信息由ajax json提交到 ashx后台:方法一:orderID = context.Request.Form["orderID"].ToString();pic
行业动态/ 2018-06-17
asp.net 实体类 存入 数据库
using System.Reflection;ChaJiLuchajilu=newChaJiLu();chajilu.weiZhangDate="2018-08-08";chajilu.weiZhangQuYu=&qu
行业动态/ 2018-06-13
.net发送post请求
using System.Text;using System.Net;using System.Net.Security;using System.Security.Cryptography.X509Certificates;using N
行业动态/ 2018-05-15
js 去空格和替换sql注入
function Trim(str) { var result; result = str.replace(/(^\s+)|(\s+$)/g, ""
行业动态/ 2018-03-27
asp.net Request.querystring集合过滤防止注入
using System.Collections.Generic;IDictionary<string, string> Dict_query = new Dictionary<string, string>();&
行业动态/ 2018-03-25
Jquery 填充表格
<table class="table table-striped table-hover table-bordered text-center">
行业动态/ 2018-02-21
ASP.NET 泛型类型 Dictionary操作
protected void Page_Load(object sender, EventArgs e) { //泛型
行业动态/ 2018-02-20
repeater控件中button按钮事件的使用
<div> <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="R
行业动态/ 2018-01-30
asp.net 对话框
System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), "opennewwindow", "alert('操
行业动态/ 2018-01-18
asp.net 动态添加Meta 属性
HtmlMeta k = new HtmlMeta(); k.Name = "keywords"; &
行业动态/ 2017-12-25
sql参数化入库
===inset into===SqlConnection conn = sqlHelper.CreateDB();cmdStr = "insert into weiZhangCityFromBaiJie (name,prefix
行业动态/ 2017-12-21
JS邮箱验证-正则验证
<form action=""> 输入:<input type="text" name="mazey" id="mazey" pl
(微信错误代码 40164)微信第三方网页授权关于回调域名的问题
最近一直在做微信第三方的开发,在微信公众平台里的开发文档上关于微信网页授权使用到了OAuth2.0,在使用中需要配置指定的链接
行业动态/ 2017-12-05
网站案例
http://www.shijing-trading.com/http://www.jc-china.net.cn/http://www.dredgertrade.com/home.asphttp://www.sillumin.
行业动态/ 2017-11-28
asp.Net中 Replace函数的用法
asp.Net中 Replace函数的用法using System.Text.RegularExpressions;string text="select it";string newStr=Regex.Re
行业动态/ 2017-11-27
jquery 模拟单选
<div> <span class="chePaiFlag onIt">普通车牌</span>  
行业动态/ 2017-11-20
于Repeater中的Button按钮中的CommandArgument传参 当有多个参数
CommandArgument=' <%# Eval("ID ") + "|" + Eval("Count
Repeater 中button 获得的DropdrownList的值
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { &nb
行业动态/ 2017-11-14
asp.net 随机码
private string CreateCode(int len) { string codeSerial = &
行业动态/ 2017-11-10
C#中在内容页获取其模板页中的对象,变量,或者值
在模板页中的程序入口改成:protected void Page_Init(object sender, EventArgs e)在内容页:string s1 = ((HomeMaster)this.Ma
行业动态/ 2017-11-05
insert into 长语句
string strfac = string.Format(@"insert into cheLiangXinXi (name,faDongJiHao,cheJiaHao,cheZhu,changPaiXingHao,chuD
C#获取实体类属性名和值 | 遍历类对象
遍历获得一个实体类的所有属性名,以及该类的所有属性的值//先定义一个类:public class User{ public string name { get; set
防止SQL注入方法总结
一、参数化SQL 是指在设计与数据库链接并访问数据时,在需要填入数值或数据的地方,使用参数 (Parameter
行业动态/ 2017-10-27
js判断上传控件FileUpload是否选择和文件类型
js判断上传控件FileUpload是否选择和文件类型 function CheckWorkFile() { &nb
行业动态/ 2017-10-13
Repeater嵌套绑定Repeater
cs:private void RpTypeBind() {//GetQuestionTypeAndCount()
行业动态/ 2017-09-12
jquery操作select,设置为选中状态,遇到不生效问题
最近用jquery操作select,设置为选中状态,遇到不生效问题,具体原因未深究,仅仅作为记录: jquery 1.8以上版本(或者更高
行业动态/ 2017-08-27
ie8兼容模式下JSON.parse无法识别
题分析: 将字符串转换成json对象,IE8兼容模式不支持通过JSON.parse将字符串转换成JSON对象的方法。虽然我是IE8的浏
行业动态/ 2017-08-22
JS获取asp.net checkboxlist的值
<asp:CheckBoxList ID="CBLyueYanQueCaiLiao" RepeatDirection="Horizontal" RepeatColumns
行业动态/ 2017-06-30
asp.net 采集到的html网页内容,去除html 标签,保留 p 和 img 标签
string pattern = @"<(?!img|p|/p).*?>"; //去除所有标签,只剩img,pstr&nb
行业动态/ 2017-06-20
asp.net List 去重
List<string> list = new List<string>(); list.Add("1&quo
行业动态/ 2017-06-19
asp.net 迅雷等下载工具会将文件取为 .aspx/.ashx等文件名的解决办法
假设当前的URL为 http://localhost/download.ashx?id=22, fileName为"test.txt",我们要把下载URL改为 http://l
.net 怎么比较日期时间的大小,差值在24小时之内
TimeSpan span = DateTime.Now-DateTime.Parse(dr["Start_Date"].ToString()) ;if (span.Days *
行业动态/ 2017-04-29
拦截sql盲注,post提交和get提交,检测cookie等内容
-----------------使用方法------------------------------------------------------------------1.将App_Code目录拷贝到web根目
如何实现CSS限制字数,超出部份显示点点点...
css样式:.contents{ width:250px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; <!-- 就
行业动态/ 2017-04-23
jquery 隐藏没有内容的元素(循环做法)
例子一:======================================================<li><span class="triangle">1</spa
行业动态/ 2017-02-10
Repeater嵌套绑定Repeater以及内层调用外层数据
父级数据:<%# DataBinder.Eval(((RepeaterItem)Container.Parent.Parent).DataItem, "qtid")%>父级序号:<%
行业动态/ 2017-01-08
asp.net 自定义类
public class DelTest1{ public DelTest1() { // // TODO: 在此处添加构造函数逻辑 // } private string _phone
行业动态/ 2017-01-04
md5加密
//-------------------方法一 在.net4.0以上-----------------------------using System;using System.Collections.Generic;usin
行业动态/ 2016-11-16
asp access 在插入一条记录后,如何获得该记录的ID
insert into weiZhangCity_aliYunXiaoKa (provinceId,province) values (2,'上海市') SELECT @@IDENTITY as ID<%conn
在js中去掉字符串的前后空格,中间保留
String.prototype.trim=function() { return this.replace(/(^\s*)|(\s*$)/g,'');}
jquery邮箱验证
var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;//验证邮箱的正则表达式
行业动态/ 2016-11-14
JS 获取日期相差天数
JS 获取日期相差天数 //s1是一个要比较的日期//s2是今天的日期,s2 = new Date();//所得到的time是相差的天数。var s1 =
行业动态/ 2016-11-08
MSSQL过滤重复记录(只显示ID最大一条)
MSSQL过滤重复记录(只显示ID最大一条)Select * From HZT Where ID In (Select Max(ID)
行业动态/ 2016-11-07
移动端(手机端)触屏基于jQuery的移动轮播图
<script src="js/jquery.min.js"></script><style> .WSCSlideWrapper{ width:100%
行业动态/ 2016-10-27
jquery 确认按钮
$(function() { $(".tysb_div>img").click(function () {
行业动态/ 2016-10-20
css透明度的设置 (兼容所有浏览器)
.transparent_class { filter:alpha(opacity=50);
javascript Date format(js日期格式化)
// 对Date的扩展,将 Date 转化为指定格式的String // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用
css3 box-sizing属性
box-sizing属性可以为三个值之一:content-box(default),border-box,padding-box。content-box,border和padding不计算入wid
spx:<table border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 5px&qu
PHP代码上传到虚拟空间后“验证码不显示”解决方法
很多朋友在迁移网站时候由于习惯用记事本修改配置文件,造成php执行异常;如:shopnc的登录验证码不能正常显示,但检查代码都正确
解决安装SQl 2008为SQL Server代理服务提供的凭据无效
sql server 2008 代理服务提供的凭据无效在Windows Server 2008安装SQL Server 2008出现的问题:安装时在“服务器配置”环节出现
asp.net fileupload控件以时间命名上传
页面里加一个上传框和按钮上传图片 :<asp:FileUpload ID="FileUpload1" runat="server" /> &nbs
win2003+iis6.0下ASP程序出现连接数据库错误的问题
asp+access程序经常出现连接数据库错误的提示,解决方法:1、确保IIS里设置正确;2、放数据库的文件夹例如:DATA的安全权限里增加
上中下三行布局,上下定高,中间栏自适应浏览器高度
CSS布局实例:上中下三行布局,上下定高,中间栏自适应浏览器高度,且内容垂直居中。 CSS布局实例:上中下三行布局,上下定高,中间
非常好用的验证码类YZMHelper(调用简单)
using System;using System.Web;using System.Drawing;using System.Security.Cryptography;namespace DotNet.Utilities{ 
CSS中ul li居中的问题
使用这种方法主要是利用li的浮动固定宽度来实现,li的默认display为block,将其这个属性改为inline便可实现这种ul li居中的问题