Talha Habib Talha Habib - 1 year ago 112
jQuery Question

Change Button value on click without id or class

Let's suppose my button is as follows:

<input type="button" value="BLUE" name="button_blue" />

What I want is when I click the button,
should be changed to
or anything I want.

Answer Source

Since the button has name="button_blue" attribute, use Attribute Equals Selector


Working demo: http://jsfiddle.net/dw8kmh3g/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download