Know the answer? Post it. Somebody with the same question will find it here.

Use plain Javascript like this:
function handleChange(input) { if (input.value 100) input.value = 100; }Then declare the input box like this:
Because you have hooked this function to onchange(), it will work even if a user copy / pastes something into the input box.


Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit Kumar SinghRank #562 · 4.3K reputationPosted Feb 14, 2016, 9:09 PM EST