国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - About form submission data
PHPz
PHPz 2017-05-19 10:20:04
0
6
1043

There are multiple input fields in the form for data display. Now click the button to submit some data, but some fields in the form do not need to be submitted. How to deal with it. Usually all submissions are submitted using ajax's serial number, such as $('form').serialize(). Now I only need to submit some fields and I don’t know how to write them. Please give me some advice!

PHPz
PHPz

學習是最好的投資!

reply all(6)
我想大聲告訴你

Jquery serialization is for elements with name attributes. If you want to remove some fields without submitting them, just remove the name attributes. This data will not be submitted when submitting.

大家講道理

Use jQuery 獲取部分 inputvalue

$("input").val()

Then send the data

某草草

Split it into two forms so that you can submit them separately

洪濤

Take out the value to be submitted and submit it as a json array

$.post{url,{a:'a',b:'b',c:'c'},function(){}}
我想大聲告訴你

Write a few more froms to submit as needed, or take the required values ??and submit them, or take all the values ??and then filter them,
or set the input attributes that do not need to be submitted to disabled.

某草草
var formData = $.param({
                actionID : 'publishExam',
                classInfo : getCheckedVal("classInfoName").toString(),
                bookletUnitInfo : getRadioVal("unitradio")
            }) + "&" + $("#examForm").serialize();

For reference!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template