<html>
<head>
<script type="text/javascript">
function referenceMe( fieldID )
{
var field = document.getElementById( fieldID );
alert( "The value of the field " + fieldID + " is: " + field.value );
}
</script>
</head>
<body>
<input type="text" id="test@code" onkeyup="javascript:referenceMe( this.id )">
</body>
</html>