开发者

what kind of html element is used for users to input an order?

开发者 https://www.devze.com 2023-01-17 21:31 出处:网络
basically I have some SQL and I want the user to be able to select the ordering in the \"order by\" section with an HTML element. Are there any out-of-the-box solutions?

basically I have some SQL and I want the user to be able to select the ordering in the "order by" section with an HTML element. Are there any out-of-the-box solutions?

edit: it's more like orde开发者_C百科r by country,status,... or order by status,country,...


if u display your sql results in a list view u can change display order by clicking on the header of your displayed fields.

EDIT: have a look at this. (hold down shift key and click on headers)


You can use a select to choose which category to search through, and then a radio button to choose ascending or descending order.

Dropdown

<select name='search'>
    <option>Name</option>
    <option>Telephone</option>
    <option>Address</option>
</select>

Radio Buttons

<input type='radio' name='order' value='asc' /> Ascending
<input type='radio' name='order' value='desc' /> Descending​​​​​​​​​​​​

Not knowing what server-side technology you're using somewhat limits the question, but basically get the value from the select, and then order depending on the radio button.

0

精彩评论

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