Win a copy of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

validation in javascript.  RSS feed

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a question regarding validation of javascript:




this code does not work , if I put only one number , form submit successfully, what should I do?
 
Author
Greenhorn
Posts: 22
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Avoid setting event handlers in this way:



Instead of specifying inline in your markup, the proper way to do this is to setup an event handler using JS, like this:





Whenever possible, try to keep your markup clean of JS and your JS clean of HTML. Will help with code maintainability.
 
It means our mission is in jeapordy! Quick, read this tiny ad!
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!