html代码: <button id = "new" onclick="showme()"></button> jquery代码: function showme(){ console.log($(this).attr('id')); }
form表单外面元素提交表单的方法: html代码: <form id="loginForm" action="{:url('Public/login')}" method="post"> <div> ...... </div> </form...
最近在使用JQuery中表单的seriazlize方法序列化元素ajax提交时,发现一个定义了display:none的元素并未被序列化,后台也无法获取。 在stackoverflow中找到了相同的问题,采纳的回复是: Serialize does include all enabled input elements with a name attribut...