<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>表单事件</title>
<script>
window.οnlοad=function()
{
var oForm=document.getElementById('form1');
oForm.οnsubmit=function()
{
alert('你确定要提交吗');
}
oForm.οnreset=function()
{
alert('你确定要重置吗');
}
}
</script>
</head>
<body>
<form id="form1" action="http://">
用户名:<input type="text" name="user" /><br />
密码:<input type="password" name="pass" />
<input type="submit" />
<input type="reset" />
</form>
</body>
</html>
表单事件
最新推荐文章于 2019-05-31 11:13:00 发布