• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
胡卫军
博客园    首页    新随笔    联系   管理    订阅  订阅
07 2014 档案
前台调用后台函数

摘要:调用 var b = $ajax("WebApplication1._Default.GetDataSet", ["23"]);js:/*方法全名,参数,类所在的程序集名称(当方法类所在的命名空间不是程序集名称时请传参数来)*/function $ajax(paramMethod, paramVal... 阅读全文
posted @ 2014-07-31 15:53 胡卫军 阅读(380) 评论(0) 推荐(0)
flv mp4视频播放

摘要:protected void Page_Load(object sender, EventArgs e) { //这个你可以直接指定路径,当然可以接收从另外一页传过来的参数,再有一个就是从数据库取出来啦。 string file = ResolveUrl("~/Flv/歌曲:王菲《传奇》.fl... 阅读全文
posted @ 2014-07-31 15:49 胡卫军 阅读(242) 评论(0) 推荐(0)
防止异步刷掉jquery加载绑定事件

摘要: 阅读全文
posted @ 2014-07-31 11:14 胡卫军 阅读(238) 评论(0) 推荐(0)
table数据再次处理

摘要:Table的聚合函数Compute (表达式,条件)中简单的聚合函数string strSumAccount = myDs.Tables[0].Compute("SUM(AccountMoney(列))", "").ToString(); 计算datatable的列的总和分页PagedDataSou... 阅读全文
posted @ 2014-07-31 10:55 胡卫军 阅读(188) 评论(0) 推荐(0)
后台调用前台函数

摘要:ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", ""); 阅读全文
posted @ 2014-07-31 10:54 胡卫军 阅读(146) 评论(0) 推荐(0)
Split生成的数组没有空字符

摘要:string[] myArrayList = paramID.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); 阅读全文
posted @ 2014-07-31 10:53 胡卫军 阅读(259) 评论(0) 推荐(0)
像页面输出脚本

摘要:无异步的 js = "window.parent.onComplete(" + System.Convert.ToString(uploadInfo.State != "Stop").ToLower() + ");"; } ScriptManager.RegisterStartupScript(... 阅读全文
posted @ 2014-07-31 10:51 胡卫军 阅读(104) 评论(0) 推荐(0)
js jq 一些属性

摘要:$(document).ready(function () { }); window.onload=方法;页面加载完触发var iWidth = 300; //窗口宽度 var iHeight = 200; //窗口高度 var iTop = (window.screen.height - iH... 阅读全文
posted @ 2014-07-31 10:50 胡卫军 阅读(325) 评论(0) 推荐(0)
默认图片

摘要:onerror=\"this.src='images/Null.gif'\" //默认图片 阅读全文
posted @ 2014-07-31 10:46 胡卫军 阅读(112) 评论(0) 推荐(0)
将Date(...)转换成yyyy-mm-dd

摘要://yyyy-mm-ddfunction ChangeDateFormat(time) { if (time != null) { var date = new Date(parseInt(time.replace("/Date(", "").replace(")/", ""), 10)); var... 阅读全文
posted @ 2014-07-31 10:38 胡卫军 阅读(602) 评论(0) 推荐(0)
浮动

摘要:定位浮动style="position:fixed; float:none; top:30px; margin:auto"div浮动position:fixed;Z-INDEX:99; top:20%; left:30%; 阅读全文
posted @ 2014-07-31 10:25 胡卫军 阅读(135) 评论(0) 推荐(0)
加小手

摘要:style="cursor:pointer"javascript:void() 阅读全文
posted @ 2014-07-31 10:24 胡卫军 阅读(116) 评论(0) 推荐(0)
数字字母不换行问题

摘要:word-break: break-all; word-wrap:break-word; 阅读全文
posted @ 2014-07-31 10:23 胡卫军 阅读(132) 评论(0) 推荐(0)
IE8变IE7

摘要: 阅读全文
posted @ 2014-07-31 10:21 胡卫军 阅读(136) 评论(0) 推荐(0)
Visible readonly enabled

摘要:Visible="false" 不显示控件readonly="false" 无法改变数值enabled="false" 不相应鼠标事件 阅读全文
posted @ 2014-07-31 10:17 胡卫军 阅读(144) 评论(0) 推荐(0)
限定输入

摘要:只能输入中文 只能输入英文和数字 只能是数字 只能显示,不能修改的文本框/限制字数 阅读全文
posted @ 2014-07-31 10:16 胡卫军 阅读(178) 评论(0) 推荐(0)
异步刷新

摘要:《--内容--》 阅读全文
posted @ 2014-07-31 10:15 胡卫军 阅读(92) 评论(0) 推荐(0)
递归查询所有子集

摘要:with myCte as(select * from RS_Comment where id=10000004union allselect RS_Comment.* from RS_Comment inner join myCte on RS_Comment.ParantID=myCte.id... 阅读全文
posted @ 2014-07-31 10:13 胡卫军 阅读(167) 评论(0) 推荐(0)
控制函数执行

摘要:不断执行timer1=setInterval(方法名,500);(500毫秒)clearInterval(timer1);取消不断执行js 延迟执行setTimeout(function () { window.location.reload() }, 3000); 阅读全文
posted @ 2014-07-31 10:04 胡卫军 阅读(130) 评论(0) 推荐(0)
bind 与unbind

摘要:bind 绑定 $("#btnSave").bind("click", BtnSaveClick);function BtnSaveClick(){...}$("#btnSave").click() 执行事件unbind 删除绑定 阅读全文
posted @ 2014-07-31 10:02 胡卫军 阅读(192) 评论(0) 推荐(0)
each()

摘要:循环 each() 参数:循环的对象,每次循环执行的函数,函数的参数(不传默认为对象本身)var lbl = $("#lbls > i");var str = "";Each(lbl, function (i) { str += i.innerHTML.trim()+","; });var arr ... 阅读全文
posted @ 2014-07-31 10:00 胡卫军 阅读(331) 评论(0) 推荐(0)
字体闪烁

摘要:字体闪烁function changeColor() { var color = "#336699|red"; color = color.split("|"); document.getElementById("blink").style.color = color[parseInt(Math.r... 阅读全文
posted @ 2014-07-31 09:59 胡卫军 阅读(133) 评论(0) 推荐(0)
checkbox全选 反选 不选 并获取id的值

摘要:$("#lblContents :checkbox").each(function () { if (this.checked) { this.checked = false; ids =""; } else { this.checked = true; ids += $(this).... 阅读全文
posted @ 2014-07-31 09:57 胡卫军 阅读(246) 评论(0) 推荐(0)
键盘事件

摘要:键盘事件 阅读全文
posted @ 2014-07-31 09:56 胡卫军 阅读(118) 评论(0) 推荐(0)
键值对参数转换为Jquery json data参数

摘要:键值对:var postData = new List>();postData.Add(new KeyValuePair("a", "1"));postData.Add(new KeyValuePair("b", "2"));postData.Add(new KeyValuePair("c", "3... 阅读全文
posted @ 2014-07-31 09:53 胡卫军 阅读(1954) 评论(1) 推荐(0)
按字节截取字符串

摘要:按字节截取字符串,参数:字符串,截取的字符 function getStr(str, n) { if (lenFor(str) 255) { byteLen += 2; } else { byteLen++; } } return byteLen; } else { ret... 阅读全文
posted @ 2014-07-31 09:50 胡卫军 阅读(244) 评论(0) 推荐(0)
前后台交互

摘要:前台:document.getElementById("").value = 3; document.getElementById("").click(); 后台: protected void btnSearch_Click(object sender, EventArgs e) { Bin... 阅读全文
posted @ 2014-07-31 09:49 胡卫军 阅读(88) 评论(0) 推荐(0)
获取url参数

摘要:window.location.href = "Index.aspx"; 当前页面打开window.open("Index.aspx") 打开新页面url传参 ResourceEdit.aspx?IsManager=1&ID=2获取url参数 request("IsManager")=1 funct... 阅读全文
posted @ 2014-07-31 09:48 胡卫军 阅读(266) 评论(0) 推荐(0)
StringBuilder效果

摘要://对象定义(构造函数) //参数:所有参数须为字符串形式. //当参数长度为1时,参数值将是字符串之间连接的分隔符 //当参数长度大于1时,最后一位将是字符串之间的分隔符,其余的参数将是字符串值 //当不指定参数时,分隔符默认为空白 //也可以不指定分隔符,而在ToString中显式指定分隔符 /... 阅读全文
posted @ 2014-07-31 09:47 胡卫军 阅读(183) 评论(0) 推荐(0)
连接数据库

摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Data.SqlClient; using System.Con... 阅读全文
posted @ 2014-07-31 09:43 胡卫军 阅读(139) 评论(0) 推荐(0)
加密

摘要:调用string mypwd = CommomLayer.MyEncryption.GetMD5Encording(pwd); using System; using System.Collections.Generic; using System.Security.Cryptography; us... 阅读全文
posted @ 2014-07-31 09:42 胡卫军 阅读(182) 评论(0) 推荐(0)
抽象类和抽象方法

摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text;namespace ConsoleApplication1 { class Program { static void Ma... 阅读全文
posted @ 2014-07-31 09:23 胡卫军 阅读(199) 评论(0) 推荐(0)
虚方法 覆写

摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using graphlei;namespace graphlei { /// /// 图形类 /// public... 阅读全文
posted @ 2014-07-31 09:21 胡卫军 阅读(115) 评论(0) 推荐(0)
冒泡排序

摘要:#region 数组 最大值 最小值 平均值 求和 冒泡排序 int[] arrag = new int[5] { 31, 62, 83, 54, 85 }; for (int i = 0; i arrag[j]) { int myarrag; myarrag = arrag[i]; a... 阅读全文
posted @ 2014-07-31 09:20 胡卫军 阅读(144) 评论(0) 推荐(0)
枚举

摘要:enum Day { sat = 10, sun, mom, tus, wes, fos, fie, fri }; static void Main(string[] args) { int x = (int)Day.sat; int y = (int)Day.wes; Console.WriteL... 阅读全文
posted @ 2014-07-31 09:18 胡卫军 阅读(80) 评论(0) 推荐(0)
随机数

摘要:1到4的随机数Random Random1 = new Random(); int i = Random1.Next(1,4); Console.WriteLine(i); Console.ReadKey(); 阅读全文
posted @ 2014-07-31 09:14 胡卫军 阅读(164) 评论(0) 推荐(0)
参数数组

摘要:参数数组:关键字params,接受参数,多余的都加到数组中static void Main(string[] args) { meas("1","2","3") } public static void meas(string paramNumber, params string[] arrag) ... 阅读全文
posted @ 2014-07-31 09:13 胡卫军 阅读(112) 评论(0) 推荐(0)
字符串及字符的基础应用

摘要:字符串的应用 #region 查找字符 //string str = "123456"; //foreach (char time in str) //{ // Console.WriteLine("{0}", time); //} //Console.ReadKey(); #endr... 阅读全文
posted @ 2014-07-31 09:12 胡卫军 阅读(130) 评论(0) 推荐(0)
修饰符

摘要://私有的:private //公有的:public //受保护的:protected 只能在只有在分类和子类中可以访问 //静态的 static 无需实例化,可直接调用,不能用private定义 //密封的 sealed 不能被重写,不能别继承, //抽象的 abstact 阅读全文
posted @ 2014-07-31 09:11 胡卫军 阅读(98) 评论(0) 推荐(0)
计算三角形面积

摘要:double numberone, double numberTwo, double numberThree//三条边,注意两边之和大于第三编double doubleS = 0; double doubleArea = 0; doubleS = (numberone + numberTwo + n... 阅读全文
posted @ 2014-07-31 09:10 胡卫军 阅读(194) 评论(0) 推荐(0)
基础语句

摘要:基础语句 #region switch case // int Number=char.Parse(Console.ReadLine()); // switch (Number) //{ // case 1: // Console.WriteLine("1"); // break; /... 阅读全文
posted @ 2014-07-31 09:08 胡卫军 阅读(128) 评论(0) 推荐(0)
控制台

摘要:输出:Console.Write("hello");换行输出:Console.WriteLine("hello");获取输入的值:Console.ReadLine()控制台不关闭:Console.ReadKey();占位符:Console.WriteLine("Sum:{1} Minus:{0} R... 阅读全文
posted @ 2014-07-31 08:57 胡卫军 阅读(132) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3