简单教程
提交运行
代码编辑器:
<script> function displayResult(){ var x=document.getElementById("reset1").value; alert(x); } </script> <form> Email: <input type="text" id="email"> <input type="reset" id="reset1" value="Reset form"> </form> <button type="button" onclick="displayResult()">显示重置按钮的值</button>
运行结果: