Standard button behavior. It can be applied to any DOM element converting it to focusable and clickable area.
These elements have behavior:button applied by default:
<button></button><input type=button><input type=reset><input type=submit>This behavior knows about:
value="string" caption that will appear on the <input type=button>.name="name" - standard attribute name - name of the input element on a form.Other than standard set of events (mouse, keyboard, focus) behavior:button generates:
spacebar key press events when button is in focus. Posted (asynchronous) event.spacebar key down when button is in focus. Synchronous event.N/A - behavior:button does not introduce any specific methods.
valuetrue/false - read-only, value of the button reflects pressed state of the button.
onClick handlervar btn = $(button#some);
btn.onClick = function() { ... event handling code ... }
on() subscriptionvar btn = $(button#some);
btn.on("click", function() { ... event handling code ... });
self.on("click", "button#some", function() { ... event handling code ... });
include "decorators.tis"; @click @on "button#some" :: ... event handling code ...;