Skip to content Skip to sidebar Skip to footer

How To Change Label Text In A Div Using Jquery

I have a label in a div .
how to write a selector to access the label and change the text .

Solution 1:

Use:

$('#mydiv label').text('smtext');

Update: to change second label element in mydiv:

 $('#mydiv label:eq(1)').text('smtext');

Post a Comment for "How To Change Label Text In A Div Using Jquery"