I don’t know what do you want to do with this code but there are many errors in your code.
check below your code without errors
<input type="text" id='name' onmouseover="return show(this,'namemessage')" onmouseout="return hide('namemessage')" />
<span id='namemessage'></span>
<br/>
<input type="text" id='email' onmouseover="return show(this,'emailmessage')" />
<span id='emailmessage'></span>
<script>
function show(inp,spanId){
var msg=document.getElementById(spanId);
msg.innerHTML='<font color="red" size="6">'+inp.id+'</font>';
}
function hide(spanId){
var msg=document.getElementById(spanId);
msg.innerHTML="";
}
</script>
solved onmouseover ,onmouseout not working?