Как вариант...
<form id='commentform'>
<button id='submit'>Тест</button>
</form>
<script>
document.querySelector('#commentform').addEventListener('submit', _ => {
_.preventDefault()
const o = document.querySelector("#submit")
o.value = 'Отправка комментария...'
o.disabled = true
const html = '<div class="comment-spinner" style="padding-left: 20px; cursor: wait;">comment-spinner<div>'
o.insertAdjacentHTML('beforebegin', html)
})
</script>