Change the Value of h1 Element within a Form with JavaScript

后端 未结 6 1171
被撕碎了的回忆
被撕碎了的回忆 2021-02-02 11:37

I have two forms on an HTML5 page. Each form has a name and an id. The second form has an h1 element, which also has a name and an id. How do I change the text of this h1 elemen

6条回答
  •  鱼传尺愫
    2021-02-02 11:45

    You can use this: document.getElementById('h1_id').innerHTML = 'the new text';

提交回复
热议问题