Window.resizeTo() in javascript
The window object represents the web browser’s window. There are various methods available in the window. one of them is resizeTo(). resizeTo() the method is used to resize the window.
The window object represents the web browser’s window. There are various methods available in the window. one of them is resizeTo(). resizeTo() the method is used to resize the window.
JavaScript is a client-side scripting language. Javascript code is downloaded from the server and executed on client’s browser. We can include javascript statements in html file or we can create a javascript file and can import it on html files. In html file we can use script tag to write javascript statements. Syntax we can … Read more
What is Hoisting? Hoisting is when the JavaScript interpreter moves all variable and function declarations to the top of the current scope. Hoisting is done during the interpreter’s first run through the code. The important thing is that the actual declarations are hoisted, and that assignments will be left where they are. Hoisting is a … Read more
Add active class to a div on javascript onclick event Here we are applying a style to a simple div. Steps to add a css class on click event Click to make Active Add active class onclick javascript to HTML ul List to make menu Here We have ul list elements to create horizontal menu … Read more
Type Conversion in JavaScript means converting one data type to another. JavaScript data type or variables can be converted into a different variable and/or different data type by the following ways: Converting Numbers to Strings Using JavaScript method The JavaScript function String() can convert numbers into strings. String() can take any numbers, literals, variables, or expressions. Consider … Read more
Operator Precedence Operator precedence determines the order in which operators are evaluated when more than one operator is used in an expression. The higher an operator’s precedence, the earlier it is evaluated in comparison with the operators with lower precedence. Consider the following example: a+b*c The above expression is evaluated in the order of the … Read more
get the ASCII value of char javascript ASCII is a Character Encoding Scheme. The full form of ASCII is American Standard Code for Information Interchange. ASCII Encode any character in 7 bits. it was developed for telegraph code. ASCII is used to represent 128 English characters in Numbers. ASCII value for A is 65, B … Read more
On many websites, you find multiple check box forms to select your interest, or to select multiple options. That can be created by using the HTML check box. Here to make an input as a text box we need type=”checkbox”. name is a name given to a text box value property that specifies what value … Read more
isPrime() Javascript represents a prime number checker function in Javascript. Prime number is a number which is divisible by one and number itself. like numbers 5,7,11,13,17, etc are prime numbers. Prime number program in javascript using for loop Below program uses for loop to check a number is prime or not. Create a function isPrime() … Read more
JavaScript Multiplication Table is a multiplication table for any number. Using JavaScript we program and generate a multiplication table of any number. Java multiplication table generation using for loop is developed as below Create a text box to get a number from the user. Create a button to submit value on the button click to … Read more