6
Answers

How To Change The InnerText of anchor Tag Using JavaScript

Hari Shanker

Hari Shanker

8y
486
1
Hi  Everyone,
 
 
 I am having an anchor tag i want to change the inner text of anchor tag,as i cannot change the text at server side .so i want to change the text at client side using javascript.
 
my code is below:
<li><a href="#sometext">Change text</a>
 
<div id="sometext ">
 <a hfref="www.somesite.com"></a>
      <div>
  <a hfref="www.mysite.com"></a>
      <div> 
</div> 
 
Thanks
Hari 

Answers (6)