V Jyothi has Published 83 Articles

Usage of text-align property in CSS

V Jyothi

V Jyothi

Updated on 31-Jan-2020 06:40:17

103 Views

The text-align property is used to align the text of a document. Possible values are left, right, center, justify.ExampleYou can try to run the following code to implement text-align property:                            This will be right aligned.                      This will be center aligned.                      This will be left aligned.          

Capitalize text with CSS

V Jyothi

V Jyothi

Updated on 31-Jan-2020 06:22:15

1K+ Views

To capitalize text with CSS, use the capitalize property. You can try to run the following code to capitalize text:                            India          

Remove a FileList item from a multiple “input:file” in HTML5

V Jyothi

V Jyothi

Updated on 30-Jan-2020 06:58:16

1K+ Views

When there is a situation where we need to remove items from DOM’s through JavaScript, we cannot do so directly from FileList object. We need to assign the following to an array:$('input:file#upload')[1].filesAfter that remove items from this array using splice or method of our choice and use that array.Another way ... Read More

How to detect point on canvas after canvas rotation in HTML5

V Jyothi

V Jyothi

Updated on 30-Jan-2020 06:15:29

200 Views

Whenever we work with canvas and want the canvas to be rotated, we need to translate point to draw point as per its rotation.A transform class can be made to detect point on the canvas after canvas rotationvar t = new Transform(); console.log(t.transformPoint(5, 6)); //Transform point will be [5, 6] ... Read More

Open a file browser with default directory in JavaScript and HTML?

V Jyothi

V Jyothi

Updated on 30-Jan-2020 06:10:44

943 Views

If you want to open a file browser in JavaScript and then want to set a default directory same as the file folder, then we cannot do it since windows do not allow you to do so, so it is not possible. For example:C: :\AmitThis is mainly due to security ... Read More

How to completely fill web page with HTML canvas?

V Jyothi

V Jyothi

Updated on 29-Jan-2020 10:51:22

236 Views

To make canvas fill the whole page, you need to be 100% in width and height of the page.* {    margin: 0;    padding: 0; } body, html {    height:100%; } #canvas {    position:absolute;    height:100%; width:100%; }

Is their any alternative to HTML5 iframe srcdoc?

V Jyothi

V Jyothi

Updated on 29-Jan-2020 10:14:05

511 Views

The srcdoc attribute specifies the HTML content of the page to show in the iframe. The HTML tag is used to create an inline frame.Alternative of the srcdoc attribute will be:var doc = document.querySelector('#demo').contentWindow.document; var content = ''; doc.open('text/html', 'replace'); doc.write(content); doc.close();Read More

How to get the first day of next month in MySQL?

V Jyothi

V Jyothi

Updated on 29-Jan-2020 05:18:35

916 Views

With the help of following MySQL query, we can get the first day of next month −mysql> SELECT DATE_FORMAT(CURDATE() + INTERVAL 1 MONTH,'%Y-%m-01') AS 'FIRST DAY OF NEXT MONTH'; +-------------------------+ | FIRST DAY OF NEXT MONTH | +-------------------------+ | 2017-11-01              | +-------------------------+ 1 row in set (0.00 sec)

How to define integer constants in JavaScript?

V Jyothi

V Jyothi

Updated on 13-Jan-2020 10:18:44

883 Views

ECMAScript allows usage of const to define constants in JavaScript. To define integer constants in JavaScript, use the const, const MY_VAL = 5; // This will throw an error MY_VAL = 10;As shown above, MY_VAL is a constant and value 5 is assigned. On assigning, another value to a constant ... Read More

What is the difference between parseInt(string) and Number(string) in JavaScript?

V Jyothi

V Jyothi

Updated on 13-Jan-2020 06:29:41

154 Views

parseInt(string)The parseInt() method parses up to the first non-digit and returns the parsed value.  For example, the following returns 765:parseInt("765world")Let’s take another example. The following returns 50:parseInt(‘50px”);Number(string)Number() converts the string into a number, which can also be a float BTW.For example, the following returns NaN:Number(“765world”)The following returns NaN:Number(“50px”);Read More

Advertisements