随笔分类 -  js相关

摘要:test.html <script type="text/javascript" src="test.js"></script> <input type="button" id="fontId" value="send sms" onclick="clickBtn();" /> test.js va 阅读全文
posted @ 2022-07-25 15:19 新手娃娃菜 阅读(363) 评论(0) 推荐(0)
摘要:function dealNumberToMoney(money){ var fmtAmt = ""; if(money&&money!=null){ money = money.replace(/,/g,"").replace(/,/g,""); if(money.indexOf(".")==-1){ money = mo... 阅读全文
posted @ 2018-10-18 13:52 新手娃娃菜 阅读(506) 评论(0) 推荐(0)
摘要:function openwindow(url,name,iWidth,iHeight){ // url 转向网页的地址 // name 网页名称,可为空 // iWidth 弹出窗口的宽度 // iHeight 弹出窗口的高度 //window.screen.height获得屏幕的高,window.screen.width获得屏幕的宽... 阅读全文
posted @ 2018-07-20 16:49 新手娃娃菜 阅读(249) 评论(0) 推荐(0)
摘要://验证数字或小数金额 function isMoney(s) { var regu = "^[0-9]+([\.]{1}[0-9]+|[\.]{0})$"; var re = new RegExp(regu); if (re.test(s)) { return true; } else { return false; ... 阅读全文
posted @ 2018-07-19 09:57 新手娃娃菜 阅读(150) 评论(0) 推荐(0)
摘要:在springmvc中ajax请求写为XXX.html,如果在controller的如:@RequestMapping(value="/login/doLogin.html",produces="application/json;charset=UTF-8") 加上后边的produces="appl 阅读全文
posted @ 2017-09-11 18:51 新手娃娃菜 阅读(153) 评论(0) 推荐(0)
摘要:原生写法: jquery写法: 阅读全文
posted @ 2017-03-28 11:00 新手娃娃菜 阅读(438) 评论(0) 推荐(0)