0

I have seen people recommending

<input name="input" readonly="readonly">

and

<input name="input" disabled="disabled">

But which of these two will:

  1. Stop users changing the value
  2. Allow jQuery to update the value
Enayet Hussain
  • 798
  • 3
  • 14
  • 32

1 Answers1

3

Use readonly, because disabled will also prevent the field from being submitted.

Barmar
  • 669,327
  • 51
  • 454
  • 560