国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

App下載
首頁javascriptsubmit_buttonJavascript Form - 如何句柄復(fù)位和提交事件處理程序

Javascript Form - 如何句柄復(fù)位和提交事件處理程序

我們想知道如何句柄復(fù)位和提交事件處理程序。


<html> 
<head> 
<script type="text/javascript"> 
function allowReset() { 
    //return window.confirm("Go ahead and clear the form?"); 
    console.log("reset");
} 
function allowSend() { 
    //return window.confirm("Go ahead and mail this info?"); 
    console.log("send");
} 
</script> 
</head> 
<body> 
<form method="POST" 
      enctype="text/plain" 
      action="mailto:a@b.com" 
      onreset="return allowReset()" 
      onsubmit="return allowSend()"> 

    Enter your first name:
    <input type="text" name="firstName" id="firstName"/> 
    Enter your last name:
    <input type="text" name="lastName" id="lastName"/>
    Enter your address:
    <input type="text" name="address" id="address"/>
    Enter your city:
    <input type="text" name="city" id="city" />
    <input type="radio" name="gender" id="gender1" checked="checked" />
    Male 
    <input type="radio" name="gender" id="gender2" />Female
    <input type="checkbox" name="retired" id="retired" />I am retired
    <input type="reset" /> 
    <input type="submit" />
</form> 
</body> 
</html>