javascript get document title code example
Example 1: how to get element by title js
var node = document.querySelector('[title="element title attribute value"]');
Example 2: change the title in html using
document.title = "My New Page Title";
var node = document.querySelector('[title="element title attribute value"]');
document.title = "My New Page Title";