<!DOCTYPE html>
<html>
<head>
<title>Form Dogrulama Testi</title>
<script src="jquery-3.1.0.js"></script>
</head>
<body>
<form id="form1" action="hedef.html">
Veri (bosluk girmeyin):
<input type="text" id = "metin1" value="">
<input type="submit" id = "gonder1" value="Gonder">
</form>
<script type="text/javascript">
$("#form1").submit(function(event) {
x = $("#metin1").val();
if (x == null || x == "" || x.indexOf(" ") != -1){
alert("Veri bosluk icermemelidir!");
event.preventDefault();
}
});
</script>
</body>
</html>