<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="ru">
<title>Заказ цветов</title>
<script language="JavaScript">
function proverka(){
var get=function(name){return document.getElementsByName(name)[0]}
var contacts={
FIO: get("ff"),
phone: get("tt")
}
var receiver={
FIO: get("ff2"),
date: get("dd"),
address: get("aa")
}
var payment=get("oo")
var test=function(field, re, name){
return re.test(field.value)
}
if (test(contacts.FIO, /^[A-ZА-Я]{3}[a-zа-я]{4}[A-ZА-Я]+$/, "contactFIO")&&test(receiver.FIO, /^[A-ZА-Я]{3}[a-zа-я]{4}[A-ZА-Я]+$/, "reciverFIO")&&test(receiver.date, /^\d\d:\d\d:201\d \d\d:\d\d$/, "reciverdate")&&test(receiver.address, /^г\. [A-ZА-Я][a-zа-я]+$/, "reciverAddress")&&test(payment, /^\d{16}$/, "payment")) return alert("Верно"); alert("Неверно")
}
</script>
</head>
<body background="images/fonoglavl0.jpg">
<meta name="Microsoft Border" content="t, default">
<form method="GET" name="form1" action="1.htm" >
<p> </p>
<hr>
<p align="center"><b><font color="#33CC33" size="6">Заказ цветов</font></b></p>
<p align="left">
Контакты</p>
<dl>
<dd>
<table>
<tr>
<td>
<p align="left">ФИО</td>
<td>
<p align="left">
<input type="text" size="35" maxlength="256" name="ff" value='' > <span lang="ru"></td>
</tr>
<tr>
<td>
<p align="left">Телефон
</td>
<td>
<p align="left"><input type="text" size="35" name="tt" value=''> <span lang="ru"></td>
</tr>
</table>
<p align="left">
Получатель доставки</p>
<table>
<tr>
<td width="101">
<p align="left">ФИО
</td>
<td>
<p align="left">
<input type="text" size="35" name="ff2" value=''> <span lang="ru"></td>
</tr>
</table>
<table>
<tr>
<td>
<p align="left">Дата
</td>
<td>
<p align="left">
<input type="text" size="35" name="dd" value=''> <span lang="ru"></td>
</tr>
</table>
<table>
<tr>
<td>
<p align="left">Адрес
</td>
<td>
<p align="left">
<input type="text" size="35" name="aa" value=''> <span lang="ru"></td>
</tr>
</table>
</dd>
</dl>
<dl>
<div align="left">
<dt>
Способ оплаты</dt>
</div>
<dd> </dd>
<dd>
<table>
<tr>
<td>
<p align="left">Номер карты </td>
<td>
<p align="left">
<input type="text" size="35" name="oo" value=''> <span lang="ru"></td>
</tr>
</table>
</dd>
</dl>
<p><input type="submit" value="Добавить" name="B1" onClick="proverka()" > <input type="reset" value="C6poc" name="B2"></p>
<p align="left"><a href="def.asp"><font color="#FF0066">
<span style="background-color: #FFFFFF">Работа с БД</span></font></a></p>
</form>
<hr>
</body>
</html>