The following statement gives me the first element with the class titanic
element = document.querySelector('.titanic');
How would I retrieve the second element with the same class?
document.querySelectorAll('.titanic')[1]
来源:https://stackoverflow.com/questions/22902447/how-to-get-the-second-match-with-queryselector