你这个form 写的不大对吧。如果你用的是php,那么你那个form 还得有个action="something", 此外还得有个确认按钮
代码基本上是这样的:
<?php
if(!IsSet($_POST['Submit']) || $_POST['Submit'] != 'ok')
{
$_POST['a'] = "";
$_POST['b'] = "";
$_POST['c'] = "";
$_POST['d'] = "";
}
else
{
//do something with these input, for example
echo $_POST['a'];
echo $_POST['b'];
echo $_POST['c'];
echo $_POST['d'];
}
?>
<body>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
<input type="text" size=5 name="a" value="<?php echo $_POST['a']; ?>"><br>
<input type="text" size=5 name="b" value="<?php echo $_POST['b']; ?>"><br>
<input type="text" size=5 name="c" value="<?php echo $_POST['c']; ?>"><br>
<input type="text" size=5 name="d" value="<?php echo $_POST['d']; ?>"><br>
<input type="submit" name="Submit" value="ok">
</form>
</body>
你自己看看,不知道对不对。