Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

use disabled= in button

<button type="button" disabled={condition? condition_true : condition_false}>Disabled with ternary</button>

ex: disabled={coin > 0 ? buy_a_car() : "No money"}
Source by sebhastian.com #
 
PREVIOUS NEXT
Tagged: #button
ADD COMMENT
Topic
Name
5+1 =