1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
butalik [34]
3 years ago
8

Fill the validateForm function to check that the phone number contains a number (use the isNaN function) and that the user name

is less than 11 characters long. Display "Phone number is invalid" and/or "User name is invalid" in the console log if the check does not pass. Use the preventDefault function to avoid submitting the form when the inputs are invalid.
html code:


Username:







JAVA:

var form = document.getElementById("userForm");

function validateForm(event) {
var phoneNumber = form.phoneNumber.value;
var userName = form.userName.value;

/* Your solution goes here */

}

form.addEventListener("submit", validateForm);

Computers and Technology
1 answer:
Wittaler [7]3 years ago
8 0

The answer & explanation for this question is given in the attachment below.

You might be interested in
A blue NFiPA label indicates: A) Health Hazard B) Special information C) Flammability D) Reactivity
elena55 [62]
Your answer would be A: Health Hazard
8 0
3 years ago
Read 2 more answers
__________ are the first line of defense against unsafe drivers.
vova2212 [387]
Peace officers are the first line of defense against unsafe drivers. These officers are appointed for a specific purpose of upholding law and order, so they would be the ones who are there to help you in case of an accident caused by unsafe drivers. A peace officers is just another term for a law enforcement officer, or just the police.
5 0
3 years ago
Reading for subject content follows the same steps as reading for entertainment. True or false.
marshall27 [118]

The answer is false.  There is a difference between reading for entertainment or leisure and reading for subject content.  In the latter, you have to scan what you are reading carefully.  There are keywords and sentences that you have to watch out for to get the whole idea of the document that you are reading.

5 0
3 years ago
Read 2 more answers
The title of a Web page is the text that appears on the title bar and taskbar of the browser window. *
forsale [732]

False

True

True

False

False

True

7 0
3 years ago
Date criteria are automatically enclosed in ____ when entered in a query design.
inysia [295]
Enclosed in number signs ######
4 0
3 years ago
Other questions:
  • Which of the following accurately completes this sentence? The Internet is ____.
    6·2 answers
  • What is tuple and attribute of a relation​
    11·1 answer
  • trhy356<br>yjetyi46ui y j4yhnpug 2utg[ 2[ 24[ou [o24t
    15·1 answer
  • Program 4: But I haven’t taken Calculus yet! OK – we admit, this one might look nasty, but read on because it’s not that bad. On
    11·1 answer
  • Consider the following classes: public class Vehicle {...} public class Car extends Vehicle {...} public class SUV extends Car {
    8·1 answer
  • Suppose you are given a bag containing n unbiased coins. You are told that n − 1 of these coins are normal, with heads on one si
    7·1 answer
  • PLZ help
    5·1 answer
  • Decision support systems help managers use structured data to identify problems and find solutions to business-related problems.
    10·1 answer
  • To delete unnecessary files on a hard disk use software
    5·2 answers
  • What does a companys code of ethics cover
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!