I'm attempting to disable a submit button onclick to prevent the user from double-clicking and submitting the same data twice. Seems simple enough but once I add in my disable code (as seen below) the button successfully is disabled but the form fails to submit.

HTML Code:
<button type="submit" class="btn" onclick="disableButtons();">Submit</button>
HTML Code:
<script type="text/javascript">
    function disableButtons() {
        $(".btn").each(function () {
            $(this).attr("disabled", "disabled");
Any ideas what I'm doing wrong here?