摘要:
encodeURIComponent()编码
decodeURIComponent()解码 阅读全文
posted @ 2020-03-11 20:25
你有我备注吗
阅读(164)
评论(0)
推荐(0)
摘要:
// 函数 function function_name(args1){ alert("这是一个有参数的函数,参数为:"+args1); } // 调用函数 // function_name(10); // 函数的返回值 function return_function(){ return "这是一 阅读全文
posted @ 2020-03-11 20:24
你有我备注吗
阅读(207)
评论(0)
推荐(0)
摘要:
// UTC 1970.1.1 到 285616年 // Date日期对象 /* 1.四种方式创建 var now = new Date(); console.log(now); var xmas = new Date('December 25,1995 13:30:00'); console.lo 阅读全文
posted @ 2020-03-11 20:23
你有我备注吗
阅读(90)
评论(0)
推荐(0)
摘要:
// 比较运算符 // 等同于 和 !== var a = 5; var astr = '5'; var isequal1 = a astr; console.log(isequal1); // == 等于 和!= 不等于 var isequal2 = a == astr; console.log( 阅读全文
posted @ 2020-03-11 20:22
你有我备注吗
阅读(80)
评论(0)
推荐(0)
摘要:
// 对象 (属性和方法)字面量创建 var person= { name:'店小二', age:22, sexual:'male', school:'奇怪的大学', love:function(){ alert("店小二超级喜欢偷懒"); return '偷懒'; } } console.log( 阅读全文
posted @ 2020-03-11 20:21
你有我备注吗
阅读(105)
评论(0)
推荐(0)
摘要:
// 数组 // 数组的创建 // 1.字面量创建 var arr = ["店","小","二","贼","不","听","话"]; console.log(typeof arr) // 2.使用js提供的构造函数创建 var arr2 = new Array(); if(Array.isArray 阅读全文
posted @ 2020-03-11 20:19
你有我备注吗
阅读(153)
评论(0)
推荐(0)