Change label text using JavaScript

前端 未结 8 1022
后悔当初
后悔当初 2020-11-27 04:39

Why doesn\'t the following work for me?



        
相关标签:
8条回答
  • 2020-11-27 05:17

    Have you tried .innerText or .value instead of .innerHTML?

    0 讨论(0)
  • 2020-11-27 05:20

    Using .innerText should work.

    document.getElementById('lbltipAddedComment').innerText = 'your tip has been submitted!';
    
    0 讨论(0)
提交回复
热议问题