05 2020 档案
摘要:1、邮箱 export const isEmail = (s) => { return /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s) } 2.手机号码 export const isMobile =
阅读全文
摘要:js var arr = [98,45,78,34,12,5,63,23,99,14] for(var i=0;i<arr.length;i++){ for(var j=0;j<arr.length-i-1;j++){ if(arr[j] > arr[j+1]){ var k = arr[j] ar
阅读全文
摘要:<table id="table"></table> $(function(){ $("#table").datagrid({ fit:true, fitColumns:true, autoRowHeight:false, method:'get', idField:'dm', toolbar:'#
阅读全文
摘要:Easyui的datebox始终显示当天时间问题 2017-10-12 382次阅读 0 条评论 之前项目中用上了easyui中的datebox,但是由于datebox 默认的时间格式 <code>m/d/y</code>,并不符合我的要求,于是参考手册将其时间格式修改为<code>y-m-d</c
阅读全文
摘要:function Money(value, num) { num = num > 0 && num <= 20 ? num : 2; value = parseFloat((value + "").replace(/[^\d\.-]/g, "")).toFixed(num) + ""; //将金额转
阅读全文
摘要:虽然都是老掉牙的东西,但是老是记不住,记在这里用的时候随时来查 table 中的tr平分table长度只需要为table指定table-layout: fixed属性即可; w3c上对table-layout: fixed属性的说明 automatic 默认。列宽度由单元格内容设定。 fixed 列
阅读全文
摘要:function GetRequest() { var url = location.search; //获取url中"?"符后的字串 var theRequest = new Object(); if (url.indexOf("?") != -1) { var str = url.substr(
阅读全文
摘要:前言:项目中的主页面里有 iframe,切换 iframe 的 src 地址之后,再点浏览器的回退之后,会导致 iframe 里面回退,而不是主页面回退。 问题 浏览器机制的原因,在 iframe 导航变化后手动点击浏览器的后退按钮也依然只是后退 iframe 中的导航。 但是我只想让父页面后退,并
阅读全文
摘要:直接上代码 window.onload = function(){ document.body.addEventListener('touchmove', function (e) { e.preventDefault(); }, {passive: false}); }
阅读全文