Jquery and Checking Attributes Value -


If there is an element that can be disabled on a page, and before I do something, I would like to see the value .

How is this done?

Thanks in advance.

If your HTML looks like this:

  & lt; Input id = "my_input_field" value = "my value" type = "text" disabled = "disabled" />  

Then you can use the following jQuery to get the value:

  $ ("# my_input_field"). Val ();  

To learn how you can access elements in the HTML document, see.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -