//Html
<form id="myForm" name="myForm">
<input id="email" name="email" value="some@email.com" />
</form>
//JS
var x=document.forms["myForm"]["email"].value;
//HTML
<input type="text" name="name" id="uniqueID" value="value" />
//JS
var nameValue = document.getElementById("uniqueID").value;