get current page title javascript code example Example: get current page title javascript document.querySelector("title").innerText