document.title = "My New Page Title"; //change/set page title in JavaScript
document.title = newTitle
document.getElementsByTagName("BUTTON")[0].attributes.item(1); // The 2nd attributeTry it
<title>This is the title</title>