是否可以创建一个 html 复选框表单,该表单将输出为 url 格式,例如:
?cat=cars+tree
目前给出这个:
<form name="input" action="/" method="post" >
<br />Select Categories: <br />
<input type="checkbox" name = "cat" value="cars" /> Cars <br />
<input type="checkbox" name = "cat" value="tree" /> Tree <br />
<input type="checkbox" name = "cat" value="drinks" /> Drinks <br />
<input type="checkbox" name = "cat" value="food" /> Food <br /> <br />
<input type="submit" value="Submit" />
如果选择了汽车和树,它将创建这个:
?cat=cars&cat=tree