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
  • 908
  • 4
  • 17
  • 33

1 Answers1

3

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

Barmar
  • 741,623
  • 53
  • 500
  • 612