JSFiddle - React, Tailwind, and code Playground

by Vincent Dagpin

HTML

<form>
  <input value="disable me" />
  <input value="disable me" />  
  <input value="disable me" />
  <input name="__RequestVerificationToken" value="not me" />
  <br />
  <br />
  <button>Disable All Except __RequestVerificationToken</button>
</form>

JavaScript

$("button").on("click", () => {
   //$('form :input').prop('disabled', true); // this works
   $('form :input:not([name=__RequestVerificationToken])').prop('disabled', true); // this not
})