1.
JavaScript File Has An Extension of:
Correct Answer
B. .Js
Explanation
The correct answer is ".Js" because in JavaScript, the file extension is typically ".js". This extension is used to identify files that contain JavaScript code. By convention, JavaScript files are saved with this extension to make it clear that they contain JavaScript code that can be executed by a JavaScript engine. Other file extensions listed in the options such as ".Java", ".javascript", and ".xml" are not commonly used for JavaScript files.
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 give a heading to the table. It is placed immediately after the opening "table" tag and before the "tr" and "td" tags. The "caption" tag helps provide a title or description for the table, making it easier for users to understand its content or purpose.
3.
IsNaN() Evaluates And Argument To Determine if Given Value:
Correct Answer
B. Is Not a Number
Explanation
The function isNaN() evaluates an argument to determine if the given value is not a number. It checks whether the argument is a numeric value or can be converted into one. If the argument is not a number, the function returns true; otherwise, it returns false.
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 convert a string representation of a number into its integer equivalent. It takes a string as input and returns the integer value. This function is commonly used in programming to convert user input or data stored as strings into integers for mathematical operations or other purposes.
5.
Which Of The Dialog Box Display a Message And a Data Entry Field?
Correct Answer
B. Prompt()
Explanation
The prompt() function displays a dialog box that contains a message and a data entry field. This allows the user to enter information or provide a response to the prompt. The other options (alert(), confirm(), and msg()) do not display a data entry field, making prompt() the correct answer.
6.
Event is Used To Check An Empty Text Box:
Correct Answer
C. OnBlur()
Explanation
The onBlur() event is used to check if a text box is empty. This event is triggered when the user moves away from the text box, indicating that they have finished entering text. By using the onBlur() event, developers can validate the input and display an error message if the text box is empty. The other options, onclick() and onFocus(), do not specifically check for an empty text box. Therefore, the correct answer is onBlur().
7.
Method Prompt() Contain ........Number of Parameters.
Correct Answer
B. Two
Explanation
The method Prompt() contains two parameters.
8.
GetMonth() returns The Month as:
Correct Answer
A. Int
Explanation
The getMonth() function in programming languages such as Java or JavaScript returns the month as an integer. This means that the function will provide the numerical representation of the month, typically ranging from 0 to 11, where 0 represents January and 11 represents December. Using an integer to represent the month allows for easier manipulation and comparison of dates within a program.
9.
If Button is clicked .......Event Handler is invoked.
Correct Answer
D. Onclick()
Explanation
When a button is clicked, the event handler associated with it is invoked. In this case, the correct answer is "Onclick()" because it is the event that is triggered when the button is clicked. The other options, "OnSubmit()", "OnLoad()", and "IsPostBack()" are not relevant in this context as they are not specific to button clicks.
10.
A Function Associated With An object is Called:
Correct Answer
B. Method
Explanation
A function associated with an object is called a method. In object-oriented programming, a method is a behavior that an object can perform. It is defined within a class and can access and manipulate the data of the object it belongs to. Methods are used to encapsulate related functionality and provide a way to interact with objects. They are called using the dot notation, where the object name is followed by the method name.
11.
Inside which HTML element do we put the JavaScript?
Correct Answer
C. Script
Explanation
JavaScript code is typically placed within the <script> element in HTML documents. This element is used to define client-side JavaScript code that interacts with the HTML content of a webpage. It can be placed either in the <head> or <body> section of the HTML document.