Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我设计了一个使用表格布局的国际象棋用户界面。每个布局由 8 个按钮组成,因此总共有 64 个按钮。我对棋子使用 ASCII 值。现在我想通过单击源按钮和目标按钮将碎片从一个地方移动到另一个地方。
哪个事件更好用,怎么可能?
You can use button onClick event. When you select source set some flag with respect to selected item. And when you select destination change the flag value to default something like -1.