JS
会飞De琥珀
这个作者很懒,什么都没留下…
展开
-
My97DatePicker
选择日期范围 $("#dtpStart").click( function () { WdatePicker({ maxDate: '#F{$dp.$D(\'dtpEnd\')||\'2099/10/01\'}' }) }); $("#dtpEnd").click( function () { WdatePi转载 2013-11-18 11:49:34 · 725 阅读 · 0 评论 -
js(=>) 箭头函数
ES6标准新增了一种新的函数:Arrow Function(箭头函数)。为什么叫Arrow Function?因为它的定义用的就是一个箭头:x => x * x上面的箭头函数相当于:function (x) { return x * x;}箭头函数相当于匿名函数,并且简化了函数定义。箭头函数有两种格式,一种像上面的,只包含一个表达式,连{ ... }和r...转载 2019-10-10 08:57:48 · 249 阅读 · 0 评论 -
'vue' 不是内部或外部命令,也不是可运行的程序 或批处理文件
vue及vue/cli安装命令npm install -g vue npm install -g @vue/cli-init解决无法执行vue.exe.的问题npm config list打开如图目录,确保安装成功把目录加入环境变量问题解决...原创 2019-09-27 16:28:08 · 38819 阅读 · 2 评论 -
javascript 月份两位表示
var d = new Date();var formatedMonth = ("0" + (d.getMonth() + 1)).slice(-2);或者Date.prototype.getMonthFormatted = function() {var month = this.getMonth() + 1;return month < 10 ? '0' + month...原创 2019-09-25 12:41:43 · 1447 阅读 · 0 评论 -
json 操作
格式校验推荐:https://www.json.cn/JS操作新增数据var arr =[{"name":"CC","sex":"男"}];arr[0].age='03'//结果{name: "CC", sex: "男", age: "03"}对象操作//往对象的末尾添加一个对象arr.push({ name:'CC', sex:'男', ...原创 2019-06-13 11:53:43 · 133 阅读 · 0 评论 -
JS实现密码加密
JS实现密码加密转载 2016-09-17 19:28:03 · 849 阅读 · 0 评论 -
JS 替换字符串
function replace(){ var str="hello world"; re=new RegExp("l","g"); var newstart=str.replace(re,"t"); alert(newstr);}转载 2016-07-01 08:33:11 · 334 阅读 · 0 评论 -
简单易用的倒计时js代码
简单易用的倒计时js代码*{ margin:0; padding:0; list-style:none;}body{ font-size:18px; text-align:center;}.time{ height:30px; padding:200px;} 00天 00时 00分 00秒 function GetRTime(){转载 2015-07-14 08:47:25 · 441 阅读 · 0 评论 -
JS动态增加行
$(document).ready(function () { //居中 $("#tab tr").attr("align", "center"); //增加 $("#but").click(function () { var _len = $("#tab tr").l转载 2015-03-24 00:39:43 · 565 阅读 · 0 评论 -
自定义Alert
Insert title herefunction sAlert(str){ var msgw,msgh,bordercolor; msgw=400;//Width msgh=100;//Height titleheight=25 //title Height bordercolor="#336699";//boder color转载 2014-11-18 09:34:50 · 411 阅读 · 0 评论 -
showModalDialog和showModelessDialog
showModalDialog和showModelessDialog 一、showModalDialog和showModelessDialog有什么不同? showModalDialog:被打开后就会始终保持输入焦点。除非对话框被关闭,否则用户无法切换到主窗 口。类似alert的运行效果。 showModelessDialog:被打开后,用户可以随机切换输入焦点。对主窗口没有任何转载 2013-11-26 17:20:09 · 522 阅读 · 0 评论 -
ES6 展开语法(Spread syntax)
展开语法,属于es6的新语法,可以在函数调用、数组构造、构造字面量对象时, 将数据展开赋值。1、函数调用,展开数组参数function sum(x, y, z) { return x + y + z;}const numbers = [1, 2, 3];sum(...numbers);2、构造数组,展开数组const arr1 = [3,4,5];const arr...转载 2019-10-10 09:29:12 · 716 阅读 · 0 评论