开发者

How to convert multi select form field with GET tto have propper URL?

<select name="channel[]" multiple="multiple">
    <option value="pants">Pants</option>
    <option value="tshirts">T-Shirts</option>
    <option value="sweats">Sweats</option>
</select>

So, form is GET, and if I select multiple, and when I click on submit URL is like:

?channel[]=pants&channel[]=tshirts

I need it to be like:

开发者_StackOverflow中文版
?channel=pants+tshirts


This cannot be achieved with an HTML only form. You'll have to incorporate javascript to manipulate the value of channel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜