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 -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -