上一页 1 ··· 12 13 14 15 16
摘要: 5-1 date(1) date对象 创建一个日期对象 语法:new Date(); 功能:创建一个日期时间对象 返回值:不传参的情况下,返回当前的日期时间对 5-7 date(2) 测算多少时间之后是星期几 阅读全文
posted @ 2019-10-06 05:11 还有什么值得拥有 阅读(150) 评论(0) 推荐(0) 编辑
摘要: random=Math.floor(Math.random()*(m-n+1)+n); 阅读全文
posted @ 2019-10-06 05:07 还有什么值得拥有 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 3-1 String(字符串检索方法) 字符串检索方法 1.想要获取字符串中某一字符 stringObject.charAt(index) 返回stringObject中得index位置的字符 stringObject.charCodeAt(index) 返回stringObject中得index位 阅读全文
posted @ 2019-10-06 04:59 还有什么值得拥有 阅读(1954) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-10-06 04:37 还有什么值得拥有 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 2-13 数组的栈方法(增删方法):(push()-unshift()-pop()和shift()) push()方法:从数组末端添加项 unshift()方法:在数组的前端添加项 pop()方法:从数组末端移除项,返回被删除的元素 shift()方法:移除数组中的第一项,返回被删除的元素 1 <s 阅读全文
posted @ 2019-10-06 04:34 还有什么值得拥有 阅读(608) 评论(0) 推荐(0) 编辑
摘要: <script> var arr=new Array(); do{ arr.push(input=prompt("请输入数字")); }while(input!=-1){}; arr.pop(); arr.sort(function(x,y){ return y-x; }); document.write(arr); </script> 阅读全文
posted @ 2019-09-18 22:54 还有什么值得拥有 阅读(317) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html> <head lang="en"> <meta charset="UTF-8"> <title>统计员工工资</title> </head> <body> <script> //定义数组arr[],和数组的索引a var arr=[],a=0; //不知道循 阅读全文
posted @ 2019-09-18 20:57 还有什么值得拥有 阅读(521) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16