logo
  • Home
  • About
  • Training
  • Programming
  • CS
  • IT
  • IS
  • ECE
  • EEE
  • EE
  • Civil
  • Mechanical
  • Chemical
  • Metallurgy
  • Instrumentation
  • Aeronautical
  • Aerospace
  • Biotechnology
  • Agriculture
  • MCA
  • BCA
  • Internship
  • Contact

JavaScript Multiple Choice Questions | MCQs | Quiz

Javascript Interview Questions and Answers
Pratice Javascript questions and answers for interviews, campus placements, online tests, aptitude tests, quizzes and competitive exams.

Get Started

•   Lexical Structure
•   Types, Values & Variables
•   Expressions & Operators
•   Statements
•   JavaScript Loops
•   Object Attributes
•   Array & Related Methods
•   Invoking Functions
•   Functional Programming
•   Closures
•   JavaScript Classes
•   Augmentation of Classes
•   JavaScript Modules
•   Pattern Matching
•   JavaScript Subsets
•   JavaScript Extentions
•   Shorthand Functions
•   Server-Side JavaScript
•   Scripting Java - Rhino
•   Asynchronous I/O - Rhino
•   Client-Side JavaScript
•   Embedding JavaScript
•   JavaScript-Web Browsers-1
•   JavaScript-Web Browsers-2
•   Client-Side Frameworks
•   Document Object Model
•   Window Object
•   Error Handling - 1
•   Error Handling - 2
•   Scripting Documents
•   Scripting CSS
•   Handling Events
•   Mouse Events
•   Text Events
•   Drag & Drop Events
•   Keyboard Events
•   Node Operations - 1
•   Node Operations - 2
•   Cookies
•   Scripted HTTP
•   The jQuery Library
•   Client-Side Storage
•   Client-Side Databases
•   Scripted Media
•   Graphics
•   Browser Rendering - 1
•   Browser Rendering - 2
•   JavaScript Performance - 1
•   JavaScript Performance - 2
•   JavaScript - FireBug
•   JavaScript - YSlow
•   JavaScript - WebPagetest
•   JavaScript Minification - 1
•   JavaScript Minification - 2
•   Web Sockets
•   JavaScript History
•   Getting Started with R - 1
•   Getting Started with R - 2
•   Getting Started with R - 3
•   Enhanced JavaScript with R
•   WebPagetest API Access
•   Configuration File Creation
•   Parsing Values - 1
•   Parsing Values - 2
•   JavaScript Benchmarking-1
•   JavaScript Benchmarking-2
•   Public API Crafting
•   Remote Logging
•   Object Invocation
•   PerfLogger Performance
•   Navigation & Memory - 1
•   Navigation & Memory - 2
•   BottleNecks Optimization
•   Script Loading - 1
•   Script Loading - 2
•   Lazy Loading - 1
•   Lazy Loading - 2
•   Cache Variable & Properties
•   Closure Compiler
•   Web Workers
•   JavaScript Blobs
•   JavaScript & Memory Leak
•   External JavaScript & PHP
•   HTML APIs
•   HTML DOM
•   Animation
•   Validation
•   Image Map
•   Debugging Forms
•   JavaScript vs Frameworks-1
•   JavaScript vs Frameworks-2

Best Reference Books

Javascript Books
« Prev Page
Next Page »

JavaScript Questions & Answers – Validation

Posted on August 29, 2013 by Manish

This set of Javascript Multiple Choice Questions & Answers (MCQs) focuses on “Validation”.

1. In which part does the form validation occur?
a) Client
b) Server
c) Both Client and Server
d) None of the mentioned
View Answer

Answer: b
Explanation: Form validation used to occur at the server, after the client had entered all necessary data and then pressed the Submit button.

2. What would happen if the data in the client had been wrong?
a) Sends back the data
b) Waits for correction
c) Sends back the data and Waits for correction
d) None of the mentioned
View Answer

Answer: c
Explanation: If some of the data that had been entered by the client had been in the wrong form or was simply missing, the server would have to send all the data back to the client and request that the form be resubmitted with correct information.

3. What is the purpose of the basic validation?
a) Data correctness
b) Mere data existence
c) Both Data correctness and Mere data existence
d) None of the mentioned
View Answer

Answer: b
Explanation: First of all, the form must be checked to make sure data was entered into each form field that required it. This would need just loop through each field in the form and check for data.

4. What is the purpose of data format validation?
a) Data correctness
b) Mere data existence
c) Both Data correctness and Mere data existence
d) None of the mentioned
View Answer

Answer: a
Explanation: The data that is entered must be checked for correct form and value. This would need to put more logic to test correctness of data.

5. Which is the function that is called to validate a data?
a) validate()
b) valid()
c) validation()
d) none of the mentioned
View Answer

Answer: d
Explanation: There is no such function to validate a data) But, you can write a function with any name to validate the data.

6. How to find the index of a particular string?
a) position()
b) index()
c) indexOf()
d) none of the mentioned
View Answer

Answer: c
Explanation: The indexOf() function can be used to find out the index of a particular character or a string.

7. How do you focus a particular part of the HTML page in JavaScript?
a) hover()
b) focus()
c) on()
d) all of the mentioned
View Answer

Answer: b
Explanation: The focus() function can be used to focus a particular part of the HTML page in JavaScript.

8. Which of the following is the child object of the JavaScript navigator?
a) Navicat
b) Plugins
c) NetRight
d) None of the mentioned
View Answer

Answer: b
Explanation: The JavaScript navigator object includes a child object called plugins.

9. Which of the following are the properties of a plug-in entry?
a) name
b) filename
c) mimeTypes
d) all of the mentioned
View Answer

Answer: d
Explanation: Each plug-in has an entry in the array. Each entry has the following properties:

  • name – is the name of the plug-in.
  • filename – is the executable file that was loaded to install the plug-in.
  • description – is a description of the plug-in, supplied by the developer.
  • mimeTypes – is an array with one entry for each MIME type supported by the plug-in.

10. What is the purpose of the mimeTypes property of a plug-in entry?
a) Contains MIME properties
b) Contains MIME sizes
c) Contains MIME types
d) None of the mentioned
View Answer

Answer: c
Explanation: mimeTypes is an array with one entry for each MIME type supported by the plug-in.

Sanfoundry Global Education & Learning Series – Javascript Programming.

To practice all areas of Javascript, here is complete set of 1000+ Multiple Choice Questions and Answers on Javascript.
« Prev Page - JavaScript Questions & Answers – Animation
» Next Page - JavaScript Questions & Answers – Image Map
« JavaScript Questions & Answers – Animation
JavaScript Questions & Answers – Image Map »

Deep Dive @ Sanfoundry:

  1. SQL Server Questions and Answers
  2. JUnit Questions and Answers
  3. Data Science Questions and Answers
  4. HTML Questions and Answers
  5. C# Programming Examples on Networking
  6. Javascript Questions and Answers
  7. JavaScript Questions & Answers – JavaScript Benchmarking and Logging with perfLogger – II
  8. JavaScript Questions & Answers – Web Sockets
  9. JavaScript Questions & Answers – Performance Measures in JavaScript – I
  10. Spring Questions and Answers – Bean validation and creating excel and pdf
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer and SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage & Cluster Administration, Advanced C Programming, SAN Storage Technologies, SCSI Internals and Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him below:
LinkedIn | Facebook | Twitter | Google+

Best Careers

Developer Tracks
SAN Developer
Linux Kernel Developer
Linux Driver Developer
Linux Network Developer

Live Training Photos
Mentoring
Software Productivity
GDB Assignment
Sanfoundry is No. 1 choice for Deep Hands-ON Trainings in SAN, Linux & C, Kernel Programming. Our Founder has trained employees of almost all Top Companies in India such as VMware, Citrix, Oracle, Motorola, Ericsson, Aricent, HP, Intuit, Microsoft, Cisco, SAP Labs, Siemens, Symantec, Redhat, Chelsio, Cavium, ST-Micro, Samsung, LG-Soft, Wipro, TCS, HCL, IBM, Accenture, HSBC, Mphasis, Tata-Elxsi, Tata VSNL, Mindtree, Cognizant and Startups.

Best Trainings

SAN I - Technology
SAN II - Admin
Linux Fundamentals
Advanced C Training
Linux-C Debugging
System Programming
Network Programming
Linux Threads
Kernel Programming
Kernel Debugging
Linux Device Drivers

Best Reference Books

Computer Science Books
Algorithm & Programming Books
Electronics Engineering Books
Electrical Engineering Books
Chemical Engineering Books
Civil Engineering Books
Mechanical Engineering Books
Industrial Engineering Books
Instrumentation Engg Books
Metallurgical Engineering Books
All Stream Best Books

Questions and Answers

1000 C Questions & Answers
1000 C++ Questions & Answers
1000 C# Questions & Answers
1000 Java Questions & Answers
1000 Linux Questions & Answers
1000 Python Questions
1000 PHP Questions & Answers
1000 Hadoop Questions
Cloud Computing Questions
Computer Science Questions
All Stream Questions & Answers

India Internships

Computer Science Internships
Instrumentation Internships
Electronics Internships
Electrical Internships
Mechanical Internships
Industrial Internships
Systems Internships
Chemical Internships
Civil Internships
IT Internships
All Stream Internships

About Sanfoundry

About Us
Copyright
TOS & Privacy
Jobs
Bangalore Training
Online Training
SAN Training
Developers Track
Mentoring Sessions
Contact Us
Sitemap
© 2011 Sanfoundry