首页 > 关于jQuery序列化表单项(radio/check组合input:text的情况)

关于jQuery序列化表单项(radio/check组合input:text的情况)

有如下表单结构:

<label for="radio">
    <input type="radio" name="real" id="" checked>
    <input type="text" name="fake" id="" value="选中">
    <span class="sim-text-field" contenteditable="true">模拟表单输入框</span>
</label>

经过序列化之后:

real=on&fake=选中

不想提交fake这一项,它只是作为real获取值的辅助性容器而已~,最终提交的是:

real=选中

除了

还有其他的方法么?


调用 serializeArray 方法后自己处理

http://api.jquery.com/seriali...

【热门文章】
【热门文章】