input[type="number"]をやめてJavaScriptで処理したサンプル

<input type="text" inputMode="numeric" id="price" value="">
<p id="error"></p>
<p>
  <button>送信</button>
</p>
p {
  margin: 5px 0;
}
.error {
  color: red;
}
#error:not(.error) {
  display: none;
}
const pathname = location.pathname.replace('/s/', '/').replace(/[^/]+\.html$/, '')
document.getElementById('back').href = 'https://iwb.jp' + pathname

const price = document.getElementById('price')
const error = document.getElementById('error')

price.addEventListener('input', (e) => {
  const price = e.target.value
  const val = price.replace(/[0-9]/g, (s) =>
    String.fromCharCode(s.charCodeAt(0) - 0xfee0)
  ).trim()
  if (/[^0-9\.]+/.test(val)) {
    error.classList.add('error')
    error.textContent = '数字以外は入力できません'
  } else {
    error.classList.remove('error')
  }
  e.target.value = val
})

元記事を表示する