摘要: http://hi.baidu.com/sixiaoyan19871/blog/item/8d1f8144c2d56939cefca31d.html 阅读全文
posted @ 2012-07-26 19:18 宁静.致远 阅读(133) 评论(0) 推荐(0) 编辑
摘要: js键盘事件全面控制主要分四个部分 第一部分:浏览器的按键事件 第二部分:兼容浏览器 第三部分:代码实现和优化 第四部分:总结第一部分:浏览器的按键事件用js实现键盘记录,要关注浏览器的三种按键事件类型,即keydown,keypress和keyup,它们分别对应onkeydown、 onkeypress和onkeyup这三个事件句柄。一个典型的按键会产生所有这三种事件,依次是keydown,keypress,然后是按键释放时候的keyup。在这3种事件类型中,keydown和keyup比较底层,而keypress比较高级。这里所谓的高级是指,当用户按下shift + 1时,keypress是 阅读全文
posted @ 2012-07-26 10:18 宁静.致远 阅读(9320) 评论(0) 推荐(1) 编辑
摘要: 作者:OoC来源:http://youring2.cnblogs.com/ Razor作为一种全新的模板被MVC3和WebMatrix使用。尽管目前还存在一定性能上面的问题,但一直不喜欢WebForm标签式写法的人已经看到了福音。Razor在减少代码冗余、增强代码可读性和vs 智能感知方面,都有着突出的优势。本文将结合示例,总结出Razor的基本用法,以便于更多人了解Razor、使用Razor。 1.开发工具 Razor是MVC3中的一个视图模板引擎,所以,我们只需要在VS2010中安装一个MVC3的工具,就可以使用Razor了。 如果你不想使用MVC3,还有另外一种选择,那便是Web... 阅读全文
posted @ 2012-07-26 10:07 宁静.致远 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 新窗口打开页面或对话框:window.open(url地址?..&..,_blank,对话框的外观参数);对话框的外观参数:"left=x坐标,top=y坐标,width=宽度,height=高度,resizable=yes,scrollbars=yes" //可变尺寸,带滚动条关闭当前页面或对话框:window.close();模态对话框:window.showModalDialog(url地址?..&..,_blank,对话框的外观参数);对话框的外观参数:"dialogLeft=x坐标,dialogTop=y坐标,dialogWidth=宽度 阅读全文
posted @ 2012-07-25 17:31 宁静.致远 阅读(2093) 评论(0) 推荐(0) 编辑
摘要: 第一种: <script language="javascript" type="text/javascript"> window.location.href="login.jsp?backurl="+window.location.href; </script>第二种: <script language="javascript"> alert("返回"); window.history.back(-1); </script>第三种: <sc 阅读全文
posted @ 2012-07-25 16:28 宁静.致远 阅读(153) 评论(0) 推荐(0) 编辑
摘要: window.open先见百度详解:http://baike.baidu.com/view/613278.htm语法:window.open(url, name, features, replace)下面是网友总结用法:1、最基本的弹出窗口代码 <script LANGUAGE="javascript"><! -- window.open ('page.html')--></script>因为这是一段javascripts代码,所以它们应该放在<script LANGUAGE="javascript &qu 阅读全文
posted @ 2012-07-25 16:27 宁静.致远 阅读(1663) 评论(0) 推荐(0) 编辑
摘要: create function [dbo].[SplitString]( @Input nvarchar(max), @Separator nvarchar(max)=',', @RemoveEmptyEntries bit=1 , @position int)returns @TABLE table ( [Id] int identity(1,1), [Value] nvarchar(max)) asbegin declare @Index int, @Entry nvarchar(max) set @Index = charindex(@Separator,@Input) 阅读全文
posted @ 2012-06-13 09:58 宁静.致远 阅读(125) 评论(0) 推荐(0) 编辑
摘要: SELECT Number,ApplyYear,CompanyNo,ContractNo FROM [Contract].[dbo].[Apply]update dbo.Apply set ApplyYear = '',CompanyNo = '',ContractNo='' where Number != ''declare cursor1 cursor for select Id,Number from [Contract].[dbo].[Apply] where Number != ''declare @id 阅读全文
posted @ 2012-06-13 09:33 宁静.致远 阅读(284) 评论(0) 推荐(0) 编辑
摘要: Create function [dbo].[SplitString]( @Input nvarchar(max), @Separator nvarchar(max)=',', @RemoveEmptyEntries bit=1 )returns @TABLE table ( [Id] int identity(1,1), [Value] nvarchar(max)) asbegin declare @Index int, @Entry nvarchar(max) set @Index = charindex(@Separator,@Input) declare @count 阅读全文
posted @ 2012-06-11 16:37 宁静.致远 阅读(287) 评论(0) 推荐(0) 编辑
摘要: declare cursor1 cursor for select Id,Number from [Contract].[dbo].[Apply] where Number != null or Number != ''declare @id uniqueidentifier;declare @number nchar(20); declare @year nchar(10);declare @companyno nchar(10);declare @contractno int;open cursor1; fetch next from cursor1 into @id,@n 阅读全文
posted @ 2012-06-11 16:35 宁静.致远 阅读(114) 评论(0) 推荐(0) 编辑