GET方法中的紧凑型URL查询字符串

时间:2018-07-05 04:12:05

标签: javascript php laravel

我想要GET方法中的紧凑型url查询,因为在我的搜索表单中输入数组可能很多,并且由于浏览器它们支持一定长度的url

例如:

example.com/search?case_control%5B%5D=1&case_control%5B%5D=2&case_control%5B%5D=3&case_control%5B%5D=4&case_control%5B%5D=5&case_control%5B%5D=6&case_control%5B%5D=7&case_control%5B%5D=8&case_control%5B%5D=9&case_control%5B%5D=10&case_control%5B%5D=11&case_control%5B%5D=12&case_control%5B%5D=13&case_control%5B%5D=14&case_control%5B%5D=15&case_control%5B%5D=16&case_control%5B%5D=17&case_control%5B%5D=18&case_control%5B%5D=19&case_control%5B%5D=20&case_control%5B%5D=21&case_control%5B%5D=22&case_control%5B%5D=23&case_control%5B%5D=24&case_control%5B%5D=25&case_control%5B%5D=26&case_control%5B%5D=27&case_control%5B%5D=28&case_control%5B%5D=29&case_control%5B%5D=30&case_control%5B%5D=31&case_control%5B%5D=32&case_control%5B%5D=33&case_control%5B%5D=34&case_control%5B%5D=35&case_control%5B%5D=36&case_control%5B%5D=37&case_control%5B%5D=38&case_control%5B%5D=39&case_control%5B%5D=40&case_control%5B%5D=41&case_control%5B%5D=42&case_control%5B%5D=43

在此示例中,选择了一个较小的数字,但它可能比此选择的选项大得多 有没有一种方法可以优化GET方法中url中的这些数组输入?

0 个答案:

没有答案