Giri Raju has Published 116 Answers

How do we send an email using HTML forms?

Giri Raju

Giri Raju

Updated on 18-Jun-2020 05:49:19

To send an email using HTML forms, you need to add the email id to the action attribute of the form. In that, add email proceeding with mailto: i.e. mailto:emailid@example.com.ExampleYou can try to run the following code to send an email using HTML forms −Live Demo<!DOCTYPE html> <html>    <body> ... Read More

What is the best way to remove an item from a Python dictionary?

Giri Raju

Giri Raju

Updated on 17-Jun-2020 11:47:49

You can use the del function to delete a specific key or loop through all keys and delete them. For example, my_dict = {'name': 'foo', 'age': 28} keys = list(my_dict.keys()) for key in keys:    del my_dict[key] print(my_dict)This will give the output:{}You can also use the pop function to delete ... Read More

instanceof operator in Java

Giri Raju

Giri Raju

Updated on 17-Jun-2020 07:30:28

This operator is used only for object reference variables. The operator checks whether the object is of a particular type (class type or interface type). instanceof operator is written as −( Object reference variable ) instanceof (class/interface type)If the object referred by the variable on the left side of the ... Read More

inheritance(is-a) v/s composition (has-a) relationship in Java

Giri Raju

Giri Raju

Updated on 17-Jun-2020 07:11:07

IS-A RelationshipIS-A is a way of saying − This object is a type of that object. Let us see how the extends keyword is used to achieve inheritance. public class Animal { } public class Mammal extends Animal { } public class Reptile extends Animal { } public class Dog extends ... Read More

How to preserve leading 0 with JavaScript numbers?

Giri Raju

Giri Raju

Updated on 17-Jun-2020 06:41:50

There’s no way to preserve the leading 0 in JavaScript. However, you can consider this id as a string and pass as an argument.ExampleYou can try to run the following code to preserve leading 0 by making it a string −Live Demo<html>    <head>       <script>     ... Read More

How to format hexadecimal Number in JavaScript?

Giri Raju

Giri Raju

Updated on 17-Jun-2020 06:35:28

Firstly convert your number to hexadecimal with leading zeros and then format it by adding dashes.ExampleYou can try to run the following code to format hexadecimal number −Live Demo<!DOCTYPE html> <html>    <body>       <script>          var num = 32122;          var ... Read More

How to create an ordered list with list items numbered with lowercase roman numbers in HTML?

Giri Raju

Giri Raju

Updated on 17-Jun-2020 06:20:08

To create ordered list in HTML, use the <ol> tag. Ordered list starts with the <ol> tag. The list item starts with the <li> tag and will be marked as numbers, lowercase letters uppercase letters, roman letters, etc. The default numbers for list items.For creating an ordered list with lowercase ... Read More

How to create an ordered list in HTML?

Giri Raju

Giri Raju

Updated on 16-Jun-2020 13:33:28

To create ordered list in HTML, use the <ol> tag. Ordered list starts with the <ol> tag. The list item starts with the <li> tag and will be marked as numbers, letters and roman numbers. The default is numbers.ExampleYou can try to run the following code to use an ordered ... Read More

How to print current year in JavaScript?

Giri Raju

Giri Raju

Updated on 16-Jun-2020 13:27:38

To get current year in JavaScript, use the getFullYear() method.ExampleYou can try to run the following code to print current year −Live Demo<!DOCTYPE html> <html>    <body>       <p>Click below to get the current year:</p>       <button onclick="display()">Display Year</button>       <p id="test"></p>     ... Read More

What are HTML 5 Standard Events?

Giri Raju

Giri Raju

Updated on 16-Jun-2020 11:38:33

When a user visits your website, they do things like click on text and images and given links, hover over things etc. These are examples of what JavaScript calls events.We can write our event handlers in JavaScript or VBScript and you can specify these event handlers as a value of ... Read More

Advertisements