<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<form action="" id="fid">
<input type="text" value="11111"/>
<input type="submit" value="ok"/>
<input type="reset" value="reset"/>
</form>
</body>
<script>
obj=document.getElementById('fid');
obj.οnsubmit=function(){
r=confirm("2121214");
if(!r){
return false;
}
}
obj.οnreset=function(){
r=confirm("2121214");
if(!r){
return false;
}
}
</script>
</html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<form action="" id="fid">
<input type="text" value="11111"/>
<input type="submit" value="ok"/>
<input type="reset" value="reset"/>
</form>
</body>
<script>
obj=document.getElementById('fid');
obj.οnsubmit=function(){
r=confirm("2121214");
if(!r){
return false;
}
}
obj.οnreset=function(){
r=confirm("2121214");
if(!r){
return false;
}
}
</script>
</html>