Rishi Rathor has Published 155 Articles

CSS3 Rounded corners

Rishi Rathor

Rishi Rathor

Updated on 19-Jun-2020 16:37:37

148 Views

CSS3 Rounded corners are used to add a special colored corner to body or text by using the border-radius property.A simple syntax of rounded corners is as follows −#rcorners {    border-radius: 60px/15px;    background: #FF0000;    padding: 20px;    width: 200px;    height: 150px; }The following table shows the ... Read More

What are some good sites for Java interview questions

Rishi Rathor

Rishi Rathor

Updated on 17-Jun-2020 13:23:21

96 Views

There are many sites which are a good resource for java interview questions-answers. Following is the list of most popular websites.Tutorialspoint  - www.tutorialspoint.comStackOverflow - www.stackoverflow.comDZone - www.dzone.comWikipedia - www.wikipedia.orgIBM Developer Works - www.ibm.com/developerworks/java/TechGig - www.techgig.comGitHub - www.github.comJava documentation - docs.oracle.com/javase/Coursera - www.coursera.org/JavaWorld - www.javaworld.com/Read More

What is the difference between new operator and object() constructor in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 17-Jun-2020 06:09:54

910 Views

The new operatorThe new operator is used to create an instance of an object. To create an object, the new operator is followed by the constructor method.In the following example, the constructor methods are Object(), Array(), and Date(). These constructors are built-in JavaScript functions.var department = new Object(); var books ... Read More

What is the shortest function of reading a cookie by name in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 12:11:58

79 Views

Here’s the best way to read cookies by name in JavaScript. The following is the function −function ReadCookie() {    var allcookies = document.cookie;    document.write ("All Cookies : " + allcookies );    // Get all the cookies pairs in an array    cookiearray = allcookies.split(';');   ... Read More

How to create cookies in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 11:51:30

622 Views

Using cookies is the most efficient method of remembering and tracking preferences, purchases, commissions, and other information required for better visitor experience or site statistics.The simplest way to create a cookie is to assign a string value to the document.cookie object, which looks like this.document.cookie = "key1=value1;key2=value2;expires=date";Here the expires attribute ... Read More

Why are parenthesis used to wrap a JavaScript function call?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 11:12:24

4K+ Views

In JavaScript, the functions wrapped with parenthesis are called “Immediately Invoked Function Expressions" or "Self Executing Functions.The purpose of wrapping is to namespace and control the visibility of member functions. It wraps code inside a function scope and decrease clashing with other libraries. This is what we call Immediately Invoked ... Read More

What is the (function() { } )() construct in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 09:15:21

1K+ Views

The (function() { } )() construct is an immediately invoked function expression (IIFE). It is a function, which executes on creation.SyntaxHere’s the syntax −(function() {    // code })();As you can see above, the following pair of parentheses converts the code inside the parentheses into an expression −function(){...}In addition, the ... Read More

How to use the required attribute in HTML?

Rishi Rathor

Rishi Rathor

Updated on 15-Jun-2020 12:01:22

132 Views

The required attribute in HTML is used o specify that the element should be filled before the form is submitted. If the field isn’t filled and the submit button is clicked, an error generates, which fails form submission. The error will be “Please fill out this field”.The required attribute can ... Read More

Display text inside an element in a smaller font size with Bootstrap

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 22:19:48

128 Views

Use the .initialism class in Bootstrap to show text inside an element. This allows setting smaller font size in Bootstrap −ExampleLive Demo           Bootstrap Example                                 ... Read More

Add a fading effect when closing an alert box in Bootstrap

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 21:41:44

165 Views

Use the .fade class in Bootstrap to add a fading effect when the alert is closed:ExampleLive Demo           Bootstrap Example                                          Eclipse Refactoring                       ×             To refactor code in Eclipse, try the below given steps in the video (You can also close this alert)                                                                

Previous 1 ... 4 5 6 7 8 ... 16 Next
Advertisements