数组的方法 arr.push() arr.unshift() arr.pop() arr.shift() arr.slice() arr.splice() arr.join() arr.find() arr.indexOf() arr.findIndex() arr.reverse() 8.arr. ...
分类:
编程语言 时间:
2018-10-15 14:50:25
阅读次数:
196
ES7的新特性 ES7 特性: 1.Array.prototype.includes2.Exponentiation Operator(求幂运算) 一,Array.prototype.includes Array.prototype.includes用法容易和简单。它是一个替代indexOf,开发人 ...
分类:
其他好文 时间:
2018-10-13 16:09:10
阅读次数:
507
传统的js数组方法 concat(),push(),pop(),shift(),unshift(),splice(),slice(),join(),sort(),reverse(); ES5新增数组方法: indexOf(),lastIndexOf(),map(),filter(),forEach( ...
分类:
编程语言 时间:
2018-10-12 21:14:35
阅读次数:
208
if(navigator.userAgent.indexOf("Chrome") >0 ){var winOption = "height="+height+",width="+width+",top=50,left=50,toolbar=no,location=no,directories=no, ...
1. indexOf indexOf()方法返回在该数组中第一个找到的元素位置,如果它不存在则返回-1。 var fruits = ["Banana", "Orange", "Apple", "Mango"]; var a = fruits.indexOf("Apple"); a 结果输出:2 2. ...
分类:
编程语言 时间:
2018-10-11 16:54:55
阅读次数:
184
public boolean is_version_great_than(String version) { boolean result = false; if (!StringUtil.isNullorEmpty(version) && version.indexOf(".") >= 0) { ... ...
分类:
编程语言 时间:
2018-10-10 20:10:49
阅读次数:
323
一、找到元素: docunment.getElementById("id");根据id找,最多找一个; var a =docunment.getElementById("id");将找到的元素放在变量中; docunment.getElementsByName("name");根据name找,找出来 ...
分类:
编程语言 时间:
2018-10-08 20:35:24
阅读次数:
173
1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not us... ...
分类:
编程语言 时间:
2018-10-06 19:52:44
阅读次数:
244
含义: indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置。(工作中常用) 提示和注释: 注释:indexOf() 方法对大小写敏感! 注释:如果要检索的字符串值没有出现,则该方法返回 -1。 实例 我们将在 "Hello world!" 字符串内进行不同的检索: 以上代码的输 ...
分类:
Web程序 时间:
2018-10-05 15:00:34
阅读次数:
951
ASP.NET MVC出来这么久了,心中却又很多的疑惑:为什么所有的View都要放在Views目录下? 为什么Shared文件夹下面的页面可以被共享? 为什么Page既可以是*.cshtml,也可以是*.aspx? 其实上面的几个问题归结起来都是视图引擎的功效。 在传统的ASP.NET中,可能还没有 ...
分类:
其他好文 时间:
2018-10-04 16:00:41
阅读次数:
188