JS Coding Questions Logo
JS Coding Questions
#274💼 Interview💻 Code

How do you perform form validation without javascript

Advertisement

728x90

You can perform HTML form validation automatically without using javascript. The validation enabled by applying the required attribute to prevent form submission when the input is empty.

html
1<form method="post">
2  <input type="text" name="uname" required />
3  <input type="submit" value="Submit" />
4  </form>

Note: Automatic form validation does not work in Internet Explorer 9 or earlier.

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 17

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
274of476
How do you perform form validation without javascript | JSCodingQuestions.com