使用Prototype如何阻止按钮提交表单?

two*_*ash 1 javascript forms prototypejs dom-events

我有一个带有两个按钮的表单.底部应该将表单提交给服务器.在表单的中间有另一个按钮,需要触发一个简单的评分函数,并在新的表单字段中添加此分数值(根据其存在将提交或不提交).

使用Prototype js库,如何从提交表单中取消此中间按钮并让它执行我的计算/ DOM添加功能?

编辑:

我目前没有阻止表单提交...

$$('.form-submit-calculate').each(function(calculator){
calculator.observe("click",function(){alert('calculate'); return false; });
});
Run Code Online (Sandbox Code Playgroud)

对于

<div id="cid_31" class="form-input-wide">
                    <div style="margin-left:406px" class="form-buttons-wrapper">
                        <button id="input_31" class="form-submit-calculate">
                            Get Score
                        </button>
                    </div>
                </div>
Run Code Online (Sandbox Code Playgroud)

Mic*_*les 7

Event.observe('scoreButton', 'click', function(e) {
    Event.stop(e);
  }
});
Run Code Online (Sandbox Code Playgroud)