 
 Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Front End Technology Articles - Page 740 of 860
 
 
			
			947 Views
The “use strict” is a directive, which is a literal expression. It introduced in JavaScript 1.8.5. As the name suggests, “use strict” indicates that the code is to be executed in strict mode. Under non-strict, the code won’t execute won’t execute in strict mode.Let us declare strict mode. To declare, add the keyword “use strict” in the beginning. For global scope, declare it at the beginning of the script. An error would come, since you have used a variable, but forgot to declare it Press F8 to see the error. "use strict"; a = 1;
 
 
			
			795 Views
In this tutorial, we will learn how to invoke a JavaScript Function with the 'new' Function Constructor. Functions are a set of reusable codes that perform a specific task and may return a value. In JavaScript, functions are defined by the keyword function. A function may not have any parameters and may also not have any return statement. In JavaScript, we also have functions with no function names, called anonymous functions Using the 'new' Function Constructor The Function constructor makes a new Function object. By using the constructor, we can create a function dynamically. It takes parameters, or arguments, and ... Read More
 
 
			
			1K+ Views
JavaScript allows us to write our own functions as well. To invoke a function somewhere later in the script, you would simply need to write the name of that function.ExampleYou can try to run the following code to learn how to call a function in JavaScript − function sayHello() { document.write ("Hello there!"); } Click the following button to call the function Use different text in write method and then try...
 
 
			
			2K+ Views
To call a function on click of a button in JavaScript, use onclick. Try to run the following code to call a function onclick in JavaScript −Example function sayHello() { document.write ("Hello there!"); } Click the following button to call the function Use different text in write method and then try...
 
 
			
			2K+ Views
In this tutorial, we will learn complex data types in JavaScript. JavaScript has multiple built-in data types to store data in different formats. The data types of JavaScript can be divided into two groups, and those are primitive data types and non-primitive data types. Number, String, Boolean, Undefined and Null are part of the primitive data type, whereas the Array and Object are part of the non-primitive data type. The typeof operator is used to identify the data types. The primitive data types are simple and easy to use. In contrast, the non-primitive data types (Array and Object) are relatively ... Read More
 
 
			
			211 Views
JavaScript also has dynamic types. That would mean the same variable used for holding different data types in JavaScript.Example var val; val = "Amit"; document.write("String: "+val); val = 20; document.write("Number: "+val); val = 40.90; document.write("Number with decimals: "+val);
 
 
			
			4K+ Views
The onsubmit event is an event that occurs when you try to submit a form. You can put your form validation against this event type. The following example shows how to use onsubmit. Here we are calling a validate() function before submitting a form data to the web server. If validate() function returns true, the form will be submitted, otherwise, it'll not submit the data.ExampleThe following example is a code snippet showing the usage of the onsubmit event − .......


