js 폼 중복 제출 막기

2714 단어
//       
function newFatherModuleVerify()
{
    var moduelName = $('#fatherModule_moduelName').val();
    alert(moduelName);
    return false;
}
        <form:form commandName="fatherModule" action="saveFatherModule" onsubmit="return newFatherModuleVerify();" method="post">
            <table class="au">
                <tr>
                    <td>    </td>
                    <td><form:input id='fatherModule_moduelName' path="moduelName"/></td>
                    <td>  HTML  </td>
                </tr>
                <tr>
                    <td>  </td>
                    <td><form:input id='fatherModule_sort' path="sort"/></td>
                    <td>  HTML  </td>
                </tr>
            </table>
            <input class="btn" style="cursor: pointer; margin-top: 10px"
                type="submit" name="submit" value="  ">
        </form:form>

관건은 리턴을 넣는 거예요.
onsubmit="return newFatherModuleVerify();"

좋은 웹페이지 즐겨찾기