snakejava,
или так
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body> <p id="error"></p>
<form id="subb" action="http://">
<input name="" id="mail">
<input name="" type="submit" value="go">
</form>
<script>
(function() {
"use strict";
document.getElementById('subb').onsubmit = function() {
if (document.getElementById('mail').value == "") {
document.getElementById('error').innerHTML = "Please enter your email";
return false;
} else {
document.getElementById('error').innerHTML = "";
return true;
}
};
})();
</script>
</body>
</html>