Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get text written in Anchor tag

<td class="td1">
<input name="CheckBox" id="c1" type="checkbox" CHECKED="" value="on"/>
<a class="a_c" id="a1">
</td>

If I know ID of Check box $(#c1) then how can I get text of Anchor tag?

like image 565
Yogesh Avatar asked Nov 27 '22 00:11

Yogesh


1 Answers

If you are not using jQuery, then below line would help.

document.getElementById('a1').innerHTML
like image 97
Umesh Patil Avatar answered Dec 15 '22 01:12

Umesh Patil