How can I remove empty fields from my form in the querystring?

后端 未结 6 1578
滥情空心
滥情空心 2020-12-16 11:17

I have a simple form with four inputs. When I submit my form, I want to use the GET http method.

For the example :

aaa : foo
bbb : ____
ccc : bar
ffffd         


        
6条回答
  •  孤城傲影
    2020-12-16 11:22

    If you want to remove all empty inputs, you can iterate over the form inputs like this:

    
    

提交回复
热议问题