07 2017 档案
摘要:这个部分代码其实参考jquery的一些函数写法,唯一区别就是调用不用,参数一样. 比如下面的栗子 //设置对象内容 jquery:$('#xxx').html('hello world'); 现在:html(document.getElementById('xxx'),'hello world')
阅读全文
摘要://cookie //设置cookie function setCookie(name,value,iDay){ var oDate=new Date(); oDate.setDate(oDate.getDate()+iDay); document.cookie=name+'='+value+';e
阅读全文
摘要:这个方法是在太多了,我之前写的文章(js数组操作–使用迭代方法替代for循环,js关键词变色,数组打乱,数组去重的实现和封装)也有提到,我今天这里就写一种之前没用过的方法。 //ES6新增的Set数据结构,类似于数组,但是里面的元素都是唯一的 ,其构造函数可以接受一个数组作为参数 //let arr
阅读全文
摘要://去除空格 type 1-所有空格 2-前后空格 3-前空格 4-后空格 function trim(str,type){ switch (type){ case 1:return str.replace(/\s+/g,""); case 2:return str.replace(/(^\s*)|
阅读全文
摘要:$.extend($.fn.validatebox.defaults.rules, { // 该方法只有在保存数据前判断才能生效 hasSame: {//验证名称 validator: function(value, param) { 验证方法体 return false; }, message:
阅读全文
摘要:List<ModelJD> data = myDalJD.GetAllDataList(); List<string> list= new List<string>();list= datalist4.Select(p => p.name).ToList(); //只取name字段,重新生成新的Li
阅读全文

浙公网安备 33010602011771号