如何选择多个按钮进行在线预订 [英] How to select multiple buttons for online reservation

查看:79
本文介绍了如何选择多个按钮进行在线预订的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I would like to make an online seat reservation by using asp.net - vb.net with sql database.

I have 450 seats I use 450 buttons for this.like in this picture
<a href="http://i69.photobucket.com/albums/i76/tothanhtuan/button_zps5e1af237.png">http://i69.photobucket.com/albums/i76/tothanhtuan/button_zps5e1af237.png</a>[<a href="http://i69.photobucket.com/albums/i76/tothanhtuan/button_zps5e1af237.png" target="_blank" title="New Window">^</a>]

i want to make a query that looks which seats are booked and which seats are free.

The free seats buttons are blue and the booked are red. Suppose you book 2 seats name A1,A2 these 2 buttons will be disable.

Can someone help me ?

推荐答案

传统的多选元素将是一组复选框,但不是按钮:

http://www.w3schools.com /jsref/dom_obj_checkbox.asp [ ^ ] ,

http://www.w3.org/TR/html -markup / input.checkbox.html [ ^ ]。



如果你需要勾选看起来像按钮的盒子(我不建议,因为,在一个恶心的页面样本上你演示了,按钮是否被按下并不是那么容易),或者有一些其他的自定义外观,模仿只有图像的复选框行为(< img> )元素显示2或通过使用不同的位图,它的 src 属性,更多状态(如已选中,未选中,已选中已禁用,未选中已禁用,未确定)。应该通过处理图像的鼠标/键盘事件来翻转这些不同的src值。



您可以找到许多此类行为的现成示例并自定义他们进一步使用你自己的位图。例如:

http://tomekwojcik.github.io/jQuery-Custom-Checkboxes/ [ ^ ],

http://webdesign.maratz.com/lab/fancy- checkboxes-and-radio-buttons / demo.html [ ^ ],

http://www.jquery4u.com/plugins/15-jquery-radio-button-checkbox-style-plugins/ [ ^ ] ......够了,我想。



您可以找到更多;沿着它使用jQuery将为您提供: http://bit.ly/I7Xqnj [ ^ ]。



您的主要目标应该是:不要做与您在问题中引用的样本类似的任何事情;用户会讨厌它。



如果你需要学习jQuery(强烈推荐),请看:

http://en.wikipedia.org/wiki/JQuery [ ^ ],

http://jquery.com [ ^ ],

http://learn.jquery.com [ ^ ],

http://learn.jquery .com / using-jquery-core [ ^ ],

http://learn.jquery.com/about -jquery / how-jquery-works [ ^ ](从这里开始)。



-SA
Traditional multi-select element would be a set of check boxes, but not buttons:
http://www.w3schools.com/jsref/dom_obj_checkbox.asp[^],
http://www.w3.org/TR/html-markup/input.checkbox.html[^].

If you need to check boxes looking like buttons (which I would not advise, because, on a disgusting-looking page sample you demonstrated, it's not so easy to see if the button are pressed down or not), or have some other custom look, mimic check box behavior with just a image (<img>) elements showing 2 or more states (like checked, unchecked, checked disabled, unchecked disabled, undetermined) through using different bitmaps it its src attribute. These different "src" values should be flipped by handling mouse/keyboard events of the images.

You can find many ready-to-use examples of such behavior and customize them further by just using your own bitmaps. For example:
http://tomekwojcik.github.io/jQuery-Custom-Checkboxes/[^],
http://webdesign.maratz.com/lab/fancy-checkboxes-and-radio-buttons/demo.html[^],
http://www.jquery4u.com/plugins/15-jquery-radio-button-checkbox-style-plugins/[^]… enough, I think.

You can find a lot more; using jQuery along it will give you this: http://bit.ly/I7Xqnj[^].

You main goal should be: don't do anything similar to the samples you referenced in your question; the users will hate it.

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://jquery.com[^],
http://learn.jquery.com[^],
http://learn.jquery.com/using-jquery-core[^],
http://learn.jquery.com/about-jquery/how-jquery-works[^] (start from here).

—SA


这篇关于如何选择多个按钮进行在线预订的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆