JS 添加千分位,测试可以使用 <script language="javascript" type="text/javascript">function comdify(n){ var re=/\d{1,3}(?=(\d{3})+$)/g; var n1=n.replace(/^(\d+)((\.\d+)?)$/,function(s,s1,s2){return s1.replace(re,"$&,")+s2;}); ret
//cookie function addCookie(objName, objValue, objHours) { //添加cookie var str = objName + "=" + escape(objValue); if (objHours > 0) { //为时不设定过期时间,浏览器关闭时cookie自动消失 var date = new Date(); var ms = objHours * 3600 * 1000; date.setTime(date.getTi