1.
Java Script File Has An Extension Of
Correct Answer
B. .Js
Explanation
The correct answer is .Js because in JavaScript, the files that contain JavaScript code typically have a file extension of .js. This convention helps to identify and differentiate JavaScript files from other types of files in a project.
2.
The Tag is used To Give Heading To The Table
Correct Answer
D. Caption
Explanation
The correct answer is caption. In HTML, the caption tag is used to provide a title or heading to a table. It is typically placed right after the opening table tag and before the opening tr tag. The content within the caption tag is displayed centered above the table, providing a brief description or title for the table.
3.
IsNaN() Evalutes And Argument To Determine if Given Value
Correct Answer
B. Is Not a Number
Explanation
The correct answer is "is Not a Number". The isNaN() function is used to evaluate an argument and determine if it is not a number. It returns true if the argument is not a number and false if it is a number. This function is commonly used to check if a value is a valid number before performing mathematical operations on it.
4.
Function is Used To Parse a String To Int
Correct Answer
B. Int.Parse
Explanation
Int.Parse is the correct answer because it is a function used to parse a string to an integer in many programming languages, including C#. It takes a string as input and converts it into an integer value. This function is commonly used when we need to convert user input or data from a file, which is in string format, into an integer for further calculations or processing.
5.
Which Of The Dialog Box Display a Message And a Data Entry Field?
Correct Answer
B. Prompt()
Explanation
The prompt() dialog box displays a message and a data entry field. It is commonly used to prompt the user for input or to get a value from the user. This dialog box allows the user to enter text or numeric values and returns the value entered by the user. The other options, such as alert(), confirm(), and msg(), do not include a data entry field and are used for displaying messages or getting a yes/no response from the user.
6.
Event is Used To Check An Empty Text Box.
Correct Answer
C. OnBlur()
Explanation
The onBlur() event is used to check an empty text box. This event is triggered when the user moves away from the text box after entering some value. It is commonly used to validate user input and ensure that required fields are not left empty. The onBlur() event can be used to display an error message or perform any other action when an empty text box is detected.
7.
Method Prompt() Contain ........Number of Parameters
Correct Answer
B. Two
Explanation
The correct answer is "Two" because the prompt() method in programming typically requires two parameters. The first parameter is the message or question to be displayed to the user, and the second parameter is the default value or input that the prompt will show. These two parameters allow the prompt() method to interact with the user and retrieve input from them.
8.
GetMonth() returns The Month as
Correct Answer
A. Int
Explanation
The getMonth() function returns the month as an integer. This means that it will return a numerical value representing the month, such as 1 for January, 2 for February, and so on. This is the most common and standard way of representing the month in programming, as it allows for easy comparison and manipulation of dates and times.
9.
If Button is clicked .......Event Handler is invoked
Correct Answer
D. Onclick()
Explanation
When a button is clicked, the event handler associated with that button is invoked. In this case, the correct answer is "Onclick()" because it is the event that occurs when the button is clicked. The other options mentioned, such as OnSubmit(), OnLoad(), and IsPostBack(), are not specifically related to button clicks.
10.
A Function Associated With An object is Called
Correct Answer
B. Method
Explanation
In object-oriented programming, a function associated with an object is called a method. Methods are defined within a class and can be called on instances of that class. They are used to perform specific actions or operations on the object's data. Unlike functions, methods have access to the object's attributes and can modify them if needed. Therefore, "method" is the correct answer as it accurately describes the relationship between an object and its associated function.
11.
Inside which HTML element do we put the JavaScript?
Correct Answer
B. JavaScript
Explanation
The correct answer is "script". This is because the element is used to embed or reference an external JavaScript file within an HTML document. It can also be used to write JavaScript code directly within the HTML document.