#42005/7/25 23:46:19
<?
if($ok)
{
echo "do someth here,insert or update the database";
}
?>
<html>
<head>
<title>test</title>
<script>
function checkForm()
{
if(form1.txt.value=="")
{
alert('error');
return false;
}
return ture;
}
</script>
</head>
<body>
<form name=form1 method=post action="<?$PHP_SELF?>" onsubmit="return checkForm()">
<input name=txt type=text value="">
<input type=submit name=ok value=submitme>
</form>
</body>
</html>
编辑历史:[此帖最近一次被 circlechu 编辑过(编辑时间:2005-07-25 23:52:29)]