I am trying to replace the page title from a text area, when the 'Go' button is pressed with jQuery. I have yet to be successful. I have tryed replaceWith(), but that didn't work so I tried this:
test.html:
<html>
<head>
<title>Test</title
<script src="jQuery.min.js"></script>
<script src="go.js"></script>
<link id="si" rel="shortcut icon" media="all" type="image/x-icon" href="http://www.google.com/favicon.ico" />
<!-- This was for trying to change the icon (also unsuccessful) -->
<link id="i" rel="icon" media="all" type="image/vnd.microsoft.icon" href="http://www.google.com/favicon.ico" />
</head>
<body>
<textarea id="title">Type the new title.>;/textarea>
<!-- Put the favicon switcher here -->
<button onclick="go()">Go</button>
<br />
</body>
</html>`
go.js:
$(function go() {
var title = document.getElementById('title').value();
document.title = title;
});