Govinda Sai has Published 74 Articles

Execute a script when a reset button in a form is clicked in HTML?

Govinda Sai

Govinda Sai

Updated on 03-Mar-2020 09:25:31

156 Views

When a form is reset, the onreset attribute triggers. You can try to run the following code to implement onreset attribute −Example                    Student Name:                              Student Subject:                                                    function display() {             alert("Form reset successfull!");          }          

How to add an inline layer in HTML?

Govinda Sai

Govinda Sai

Updated on 03-Mar-2020 06:18:41

260 Views

Use the tag to add an inline layer. The HTML tag is used to create a layer that occupies space in the containing text flow. Subsequent content is placed after the space occupied by the .This is in contrast to the tag, which creates a layer above ... Read More

Execute a script when a user releases a key in HTML?

Govinda Sai

Govinda Sai

Updated on 03-Mar-2020 05:38:42

77 Views

Use the onkeyup attribute. The onkeyup attribute triggers when the user releases a key.ExampleYou can try to run the following code to execute a script on releasing a key −           Press a key inside the textbox.                      function display() {             alert("You released a key!");          }          

Set the character encodings that are used for form submission in HTML

Govinda Sai

Govinda Sai

Updated on 02-Mar-2020 12:39:07

169 Views

The accept-charset attribute in HTML is used to include the character encodings for form submission.ExampleYou can try to run the following code to implement accept-charset attribute in HTML −           File Upload Box                                  

What is the type specifier for boolean in C++?

Govinda Sai

Govinda Sai

Updated on 26-Feb-2020 11:15:59

130 Views

The type specifier for boolean in c++ is bool. You can use it as −bool myBoolean = true;

What is the difference between replace() and replaceAll() in Java?

Govinda Sai

Govinda Sai

Updated on 26-Feb-2020 10:04:59

840 Views

The replace method of the String class accepts two characters and it replaces all the occurrences of oldChar in this string with newChar.Exampleimport java.io.*; public class Test {    public static void main(String args[]) {       String Str = new String("Welcome to Tutorialspoint.com");       System.out.print("Return Value ... Read More

What does the method remove(int) do in java?

Govinda Sai

Govinda Sai

Updated on 25-Feb-2020 10:19:36

56 Views

The remove(int index) method of the java.util.ArrayList class removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).Exampleimport java.util.ArrayList; public class ArrayListDemo {    public static void main(String[] args) {       ArrayList arrlist = new ArrayList(5); ... Read More

What does the method ensureCapacity(int, minCapacity) do in java?

Govinda Sai

Govinda Sai

Updated on 25-Feb-2020 10:10:30

107 Views

The ensureCapacity(int minCapacity) method of the class java.util.ArrayList increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.Exampleimport java.util.ArrayList; public class ArrayListDemo {    public static void main(String args[]) {       ArrayList ... Read More

Java command line arguments

Govinda Sai

Govinda Sai

Updated on 25-Feb-2020 05:13:48

12K+ Views

A command-line argument is an information that directly follows the program's name on the command line when it is executed. To access the command-line arguments inside a Java program is quite easy. They are stored as strings in the String array passed to main( ).ExampleThe following program displays all of ... Read More

How to force Chrome's script debugger to reload JavaScript?

Govinda Sai

Govinda Sai

Updated on 21-Feb-2020 12:43:45

3K+ Views

To force Google Chrome’s script debugger to reload JavaScript, follow the below steps −Open Dev ToolsClick on the Sources tabFind your script / image / fileCheck the right panel to see if your file is up to dateIf the file is not up to date, then −Right-click the resource in the ... Read More

Advertisements