控制网页前进/后退
history.forward();
history.back();
选择元素点击
// https://yihui.org/
var topBar = document.getElementsByTagName("a");
console.log(topBar[3].href);
topBar[3].click();
var x = document.getElementsByClassName("UnderlineNav-item");
console.log(x);
x[0].click();
for循环
cars = [1,2,3,4,5,6]
for (var i=0; i<cars.length; i++)
{
console.log(i);
}
var mycars = new Array(); # 创建数组
mycars[0] = "Saab";
mycars[1] = "Volvo";
mycars[2] = "BMW";
for (var i=0; i< mycars.length; i++) {
console.log(mycars[i]);
}