-constructor

May 14

split() 方法使用指定的分隔符字符串将一个String对象分割成字符串数组,以将字符串分隔为子字符串,以确定每个拆分的位置。

var str = \'The quick brown fox jumps over the lazy dog.\';

var words = str.split(\' \');
console.log(words[3]);
// expected output: "fox"

var chars = str.split(\'\');
console.log(chars[8]);
// expected output: "k"

var strCopy = str.split();
console.log(strCopy);
// expected output: Array ["The quick brown fox jumps over the lazy dog."]

toLowerCase()方法返回转换为小写的调用字符串值

toUpperCase 则相反

 

element.classList 本身是只读的,但是你可以使用 add()  remove()方法修改它。

add( String [, String] )添加指定的类值。如果这些类已经存在于元素的属性中,那么它们将被忽略。

remove( String [,String] )删除指定的类值。

 

!优先级别比较低需要在后面加上括号   if(!(a === 1))

分类:

技术点:

相关文章:

  • 2021-09-14
  • 2021-06-04
  • 2022-01-16
  • 2021-06-26
  • 2021-12-31
  • 2021-05-27
  • 2022-01-23
  • 2021-10-13
猜你喜欢
  • 2021-11-05
  • 2021-11-05
  • 2022-12-23
  • 2021-10-11
  • 2021-05-11
  • 2021-12-21
  • 2021-06-18
相关资源
相似解决方案