开发者

Javascript to check req fields on button click

开发者 https://www.devze.com 2022-12-16 13:22 出处:网络
Good day, I urgently need help. I need to check all fields have values on click of button. The button already has a command but i need to check / run through the page for required fields.

Good day, I urgently need help.

I need to check all fields have values on click of button.

The button already has a command but i need to check / run through the page for required fields.

On find a blank req开发者_StackOverflow社区uired field then display message else continue with button next command.

If possible, maybe something that continues check on the form & display text this is required before making button visibe?

I need to get this going else my project is screwed.

Regards


  • jQuery: http://docs.jquery.com/Plugins/Validation/validate
  • Prototype: http://tetlaw.id.au/view/blog/really-easy-field-validation-with-prototype/

If you use either of those libraries, it's already written. Otherwise, look at their implementations and roll your own.


Javascript form Validation check this out readly baked just learn it and use according to your requirement .

Just for validating a form its not a good to include entire framework.

w3schools to start with as a beginner to understand the above baked one , Next time you can write your own. :)

Hope it helps !

0

精彩评论

暂无评论...
验证码 换一张
取 消