

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The advantages and limitations of client-side scripting using javascript. It covers common tasks, ways to insert javascript in html, primitive datatypes, operators, and more. Learn about arrays, strings, dates, html manipulation, events, and dom objects.
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!


i) indexOf(), pop(), push(), shift(), unshift(), slice(), splice() methods of Array. ii) concat(), replace(), search(), split(), slice(), substring(), substr() methods of String. iii) getFullYear(), getMonth(), getDate(), getHours() methods of Date.
with JavaScript.
click, submit, reset, load, unload.
capturing?
i) To determine whether a given year is a leap year. ii) To format a number up to specified decimal places. iii) To check whether a string is palindrome or not. iv) That accepts a string as a parameter and converts the first letter of each word of the string in upper case. Example string: The students of MCA second year Expected Output: The Students Of MCA Second Year v) That accepts a string as a parameter and finds the longest word within the string. Example string: JavaScript Lab Assignments Expected Output: Assignments vi) Which accepts an argument and returns the type. Note: There are six possible values that typeof returns: object, boolean, function, number, string, and undefined. vii) To get the number of occurrences of each letter in specified string. viii) That accepts two arguments, a string and a letter and the function will count the number of occurrences of the specified letter within the string in a case-insensitive way. Sample arguments: MCA students of Second year, s Expected output: 3
ix) To remove duplicate items from an array. x) To add specified years to a date. xi) To add specified months to a date. xii) To add specified weeks to a date. xiii) To get difference between two dates in days. xiv) To create a digital clock. xv) To change font, font size and colour of a paragraph. xvi) To change background colour of a paragraph. xvii) To create random background colour. xviii) Validate an HTML student registration form containing roll no, first name, middle name, last name, password, date of birth, mobile number, email address, marks obtained, grade point, with the following validation rules i) All the fields except for middle name cannot be empty. ii) Roll no. will be consisting of digits only. iii) First name, middle name (if present), last name will be consisting of alphabets only. iv) Password length will be 6 to 14, containing alphabets, digits and special characters @, $, #, _ and must contain at least one alphabet, at least one digit and at least one of the special characters. v) Age must be at least 18 years. vi) Mobile number will be 10 digits not starting with zero. vii) Email must be in a valid email format. viii) Grade point will consist of an integer part and a decimal part. ix) A student with negative marks or grade point less than 6.5 will not be allowed registration.