<form id="myform" name="myform" action="" class="full">
<div>
<input type="text" class="newEnter" id="nome" tabindex="0" name="nome" onkeypress="myFunctionChar(event)">
</div>
<div>
<input type="text" class="newEnter" id="endereço" tabindex="1" name="endereço" onkeypress="myFunctionChar(event)">
</div>
<div>
<input type="text" class="newEnter" id="cidade" tabindex="2" name="cidade" onkeypress="myFunctionChar(event)">
</div>
</form>
<script>
function myFunctionChar(event) {
// var h = event.charCode || event.keyCode;
// if (y == 111 || y == 79) { // o is 111, O is 79
// alert("You pressed the 'O' key!");
// }else{
if (event.key=="Enter"){
var x = document.getElementById("myform").querySelectorAll("input");
document.getElementById("hum").innerHTML=x.length;
var y=x[0].tabIndex;
</script>