Search found 117 matches

by admin
Tue May 19, 2020 2:07 am
Forum: HTML CSS
Topic: Learn about Internal Styles in CSS
Replies: 0
Views: 5251

Learn about Internal Styles in CSS

CSS enclosed in <style></style> tags within an HTML document functions like an external stylesheet, except that it lives in the HTML document it styles instead of in a separate file, and therefore can only be applied to the document in which it lives. Note that this element must be inside the <head>...
by admin
Tue May 19, 2020 1:57 am
Forum: HTML CSS
Topic: Learn what is External Stylesheet in CSS
Replies: 0
Views: 4261

Learn what is External Stylesheet in CSS

An external CSS stylesheet can be applied to any number of HTML documents by placing a <link> element in each HTML document. The attribute rel of the <link> tag has to be set to "stylesheet", and the href attribute to the relative or absolute path to the stylesheet. While using relative URL paths is...
by admin
Mon May 18, 2020 8:50 pm
Forum: JavaScript, jQuery, ES6+
Topic: Get the current time and date in Javascript
Replies: 0
Views: 6382

Get the current time and date in Javascript

Use new Date() to generate a new Date object containing the current date and time. Note that Date() called without arguments is equivalent to new Date(Date.now()). Once you have a date object, you can apply any of the several available methods to extract its properties (e.g. getFullYear() to get the...
by admin
Sun May 17, 2020 8:16 pm
Forum: JavaScript, jQuery, ES6+
Topic: Get the number of milliseconds elapsed since 1 January 1970 00:00:00UTC
Replies: 0
Views: 4140

Get the number of milliseconds elapsed since 1 January 1970 00:00:00UTC

The static method Date.now returns the number of milliseconds that have elapsed since 1 January 1970 00:00:00 UTC. To get the number of milliseconds that have elapsed since that time using an instance of a Date object, use its getTime method. // get milliseconds using static method now of Date conso...
by admin
Sun May 17, 2020 8:09 pm
Forum: JavaScript, jQuery, ES6+
Topic: Learn about how to format a JavaScript date
Replies: 0
Views: 4113

Learn about how to format a JavaScript date

Formatting a JavaScript date in modern browsers In modern browsers (*), Date.prototype.toLocaleDateString() allows you to define the formatting of a Date in a convenient manner. It requires the following format : dateObj.toLocaleDateString([locales [, options]]) The locales parameter should be a st...
by admin
Sun May 17, 2020 7:53 pm
Forum: JavaScript, jQuery, ES6+
Topic: Learn how to create a Date from UTC
Replies: 0
Views: 4071

Learn how to create a Date from UTC

By default, a Date object is created as local time. This is not always desirable, for example when communicating a date between a server and a client that do not reside in the same timezone. In this scenario, one doesn't want to worry about timezones at all until the date needs to be displayed in lo...
by admin
Sun May 17, 2020 6:47 pm
Forum: JavaScript, jQuery, ES6+
Topic: Different ways to convert date into a string format
Replies: 0
Views: 4229

Different ways to convert date into a string format

Convert to String var date1 = new Date(); date1.toString(); Returns: "Sun May 17 2020 07:48:48 GMT-0400 (Eastern Daylight Time)" Convert to Time String var date1 = new Date(); date1.toTimeString(); Returns: "07:48:48 GMT-0400 (Eastern Daylight Time)" Convert to Date String var date1 = new Date(); d...
by admin
Sun May 17, 2020 6:27 pm
Forum: JavaScript, jQuery, ES6+
Topic: Know more about how to create date object in javascript
Replies: 0
Views: 4070

Know more about how to create date object in javascript

https://developersdiscussion.com/ext/dmzx/imageupload/files/592a06291d3b0581905804331f782e1c.png Create a new Date object To create a new Date object use the Date() constructor: with no arguments - Date() creates a Date instance containing the current time (up to milliseconds) and date. with one in...
by admin
Sat Dec 07, 2019 1:19 am
Forum: JavaScript, jQuery, ES6+
Topic: You don't know everything about Strings in JavaScript
Replies: 0
Views: 4809

You don't know everything about Strings in JavaScript

Basic Info and String Concatenation Strings in JavaScript can be enclosed in Single quotes 'hello', Double quotes "Hello" and (from ES2015, ES6) in Template Literals (backticks) `hello`. var hello = "Hello"; var world = 'world'; var helloW = `Hello World`; // ES2015 / ES6 Strings can be created fro...
by admin
Sun Nov 03, 2019 5:24 pm
Forum: PHP
Topic: Accessing A Variable Dynamically By Name (Variable variables) using PHP
Replies: 0
Views: 6826

Accessing A Variable Dynamically By Name (Variable variables) using PHP

Variables can be accessed via dynamic variable names. The name of a variable can be stored in another variable, allowing it to be accessed dynamically. Such variables are known as variable variables. To turn a variable into a variable variable, you put an extra $ put in front of your variable. $vari...