1.在SQL service中的写法: --Function主体 CREATE FUNCTION [dbo].[FnMoneyStyle](@Number )) RETURNS VARCHAR() AS BEGIN DECLARE @ReturnValue varchar() SET @ReturnValue= SET @Number=ISNULL(@Number,) --千分 IF @strType = ' --千分 无小数点 SET @ReturnValue= left(convert(va
以下Function可以用于textbox的KeyUp事件: 2014-06-06 发现旧版IE不支持selectionStart还有字符串的"[]"索引获取值, 已经修复这个bug. 2014-06-10 修复上一次修复遗留的IE的bug. /* Validate the textbox value is decimal. */ var numberChars = "1234567890"; function isDecimal(item) { var obj =
mysql数字加减科学计数法 这两天因为需求,需要获取一张表的流水号.规则是这样的.当前日期+8位流水号.比如:2015062400000001,2015062400000002,2015062400000003.... 因为考虑到并发问题,所以解决的方案是:在MySQL写存储过程,逻辑如下: 1.查询表今天流水号的最大主键值:如: SELECT MAX(a.ORDER_ID) from Zhang_Test a where 1=1 and a.order_id LIKE CONCAT('%',
js脚本function: //js数字千分符处理 function commafy(num) { num = num + ""; var re = /(-?\d+)(\d{3})/ while (re.test(num)) { num = num.replace(re, "$1,$2") } return num; }
//js数字千分符处理 function commafy(num) { num = num + ""; var re = /(-?\d+)(\d{3})/ while (re.test(num)) { num = num.replace(re, "$1,$2") } return num; } 执行下,效果不错,收藏记录