Jquery gets the value method of the currently clicked object

  • 2020-03-30 02:11:49
  • OfStack

Example: gets the value of li in ul

First, in HTML we set the value for each li
<li value=" hello "></li> 
<li value="hello"></li> 
<li value="=-="></li> 

Then get the corresponding value according to the click event through jquery

Related articles: