Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false;}
else {return true}
}
}function validate_form(thisform)
{
with (thisform)
{
if (validate_required(imepole,"полето е празно!")==false)
{imepole.focus();return false;}
}
}
</script>
</head><body>
<form action="submitpage.htm" onsubmit="return validate_form(this)" method="post">
pole: <input type="text" name="imepole" size="30">
<input type="submit" value="Submit">
</form>
</body></html>
TreantBG каза:като натисна ок след като ми е изписало съобщението ми изпраща формата
няма ли нещо като exit; ??
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false;}
else {return true}
}
}function validate_form(thisform)
{
with (thisform)
{
if (validate_required(imepole,"полето е празно!")==false)
{imepole.focus();return false;}
}
}
</script>
</head><body>
<form action="submitpage.htm" onsubmit="return validate_form(this)" method="post">
pole: <input type="text" name="imepole" size="30">
<input type="submit" value="Submit">
</form>
</body>
</html>