首页javascriptreset_buttonJavascript Form - 如何得到重置按钮类型

Javascript Form - 如何得到重置按钮类型

我们想知道如何得到重置按钮类型。

    
<html>
<body>
    <form name="form1">
        Enter Name: <input type="text" Name="name" Size=15>
        <br>
        Enter Phone: <input type="text" Name="phone" Size=10>
        <br><br>
        <input type="reset" name=resetbutton value=Reset
           onClick='console.log("The button type is: " + document.form1.resetbutton.type)'>
    </form>
</body>
</html>