12 2010 档案
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf
阅读全文
摘要:1.document.formName.item("itemName") 问题说明:IE下,可以使用document.formName.item("itemName")或document.formName.elements["elementName"];Firefox下,只能使用document.formName.elements["elementName"]. 解决方法:统一使用document.formName.elements["elementName"]. 2.集合类对象问题说明:IE下
阅读全文
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><html> <head> <meta content="text/html; charset=utf-8" http-equiv=&qu
阅读全文
摘要:不知何故,firefox对于类似“2010-12-20 15:55:00”这种时间的转换格式不感冒,返回Nan,查了查资料,把“-”替换为“/”就可以了;<mce:script type="text/javascript"><!--var inputDate="2010-12-20 15:55:00";inputDate=inputDate.replace("-", "/").replace("-", "/");var nowDate=new Date();
阅读全文
摘要:方法一:javascript(Jquery)实现时间比较 $(document).ready(function () { //验证定时时间晚于当前时间 $("#<%= DPkScheduleDateTime.ClientID%>").blur(function () { var scheduleDate = new Date($("#<%= DPkScheduleDateTime.ClientID%>").val()); var Date_Now = new Date(); if (scheduleDate < Date_N
阅读全文
摘要:以一个简单商品表为例,商品表包含商品编号,批次,数量,价格等字段,现在想要查询不同批次商品的加权平均价,具体问题描述如下:建表语句(展开-复制-运行即可初始化数据):CREATE TABLE [dbo].[Product]( [ID] [int] NULL, --商品编号 [ProductID] [int] NULL, --商品ID [BatchNumber] [nchar](50) NULL, --商品批次 [Price] [decimal](18, 2) NULL, --商品价格 [Amount] [int] NULL ...
阅读全文
摘要:SQL 中使用ltrim()去除左边空格,rtrim()去除右边空格,没有同时去除左右空格的函数,要去除所有空格可以用replace(字符串,' ',''),将字符串里的空格替换为空。 例:去除空格函数。declare @temp char(50)set @temp = ' hello sql 'print ltrim(@temp) --去除左边空格print rtrim(@temp) --去除右边空格print replace(@temp,' ','') --去除字符串里所有空格print @temp>&g
阅读全文