日期:2014-05-16 浏览次数:20468 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>输完数据自动点击“保存”按钮</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
姓名:<input type="text" name="textfield" /><p>
年龄:<input type="text" name="textfield2" /><p>
性别:<input type="text" name="textfield3" /><p>
<input type="button" onclick='aaa()' value="提交" />
<script>
function aaa(){
alert('点击保存一次');
}
</script>
</p>
</form>
</body>
</html>
<form id="form1" name="form1" method="post" action="">
姓名:<input type="text" name="textfield" /><p>
年龄:<input type="text" name="textfield2" /><p>
性别:<input type="text" name="textfield3" /><p>
<input type="submit" onclick='aaa()' value="提交" />
<script>
document.onclick=function(){
alert('点击空白处保存信息');
document.getElementById("form1").submit();
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>输完数据自动点击“保存”按钮</title>
</head>