Operation of node attributes jQuery

1, attr () is used to read or set properties 
- passing a parameter to read the property
- property passed two parameters
Note: The value no matter how many elements are found only returns the first element attribute nodes specified
but will all the value of an attribute node elements are set to the specified value
if the property node set does not exist, then all of the elements will be found to add the attribute node

 

 2, prop () method

  

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/qqinhappyhappy/p/11728900.html