示例: <script type="text/javascript"> function onSubmit() { alert("保存数据"); } </script> <body> <input id="btnUpdate" type="button" value="保存" class="btn-blue" onclick="onSubmit()" /> </body>