HTML DOMへの書き込みに使用できるJavascriptコードは何ですか?クリックするたびにドキュメント要素に異なるテキストを書き込むボタンを作成したいですか?例;
最初のクリック:
document.getElementById("paragraph").innerHTML= "This is is the initial text."
2回目のクリック:
document.getElementById("paragraph").innerHTML= "This text replaces the initial text"
3回目のクリック:
document.getElementById("paragraph").innerHTML= "This text replaces the text from the second click"
などなど...
事前に感謝せずにすべて。