Friday, June 15, 2018

Anil kr Prajapati

How to get current Date and Time using JavaScript || JavaScript Date Formats




This tutorial shows, how can you get the current date and time in JavaScript. Use the following JavaScript code to get current date and time with Y-m-dand H:i:s format.


JavaScript Date object help us to work with date type of strings. Use new Date() to create a new object with current date and time.
var today = new Date();
You can get current date from Date object in Y-m-d format.
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
You can get current time from Date object in H:i:s format.
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
You can  get current date and time from Date object in Y-m-d H:i:s format.
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
var dateTime = date+' '+time;

JavaScript Date Format :-

There are 4 types of JavaScript date input formats.
  1. ISO Dates
  2. Long Dates
  3. Short Dates
  4. Full Format

JavaScript ISO Dates -

ISO 8601 is the international standard for the representation of dates and times.

The ISO 8601 syntax (YYYY-MM-DD) is more preferred JavaScript date format. 

Syntax as below: 

var date_o = new Date("2015-03-25");



JavaScript Short Dates -

Here short dates are written differently with an formate "MM/DD/YYYY" syntax as below:

var date_o = new Date("03/25/2015");


JavaScript Long Dates-

Here long dates are most often written with a "MMM DD YYYY" syntax as below:

var date_o = new Date("Mar 25 2015");


Full Date Format -

JavaScript accept date strings in the format of "full JavaScript format": syntax as like this ;:

var date_o = new Date("Fri Mar 25 2015 09:56:24 GMT+0100 (Tokyo Time)");

Read More

Thursday, March 29, 2018

phpMyPassion

jQuery Core - All Version List || jQuery Version


Here I am sharing jQuery version list.

jQuery Core & Migrate - Git Builds

UNSTABLE, NOT FOR PRODUCTION

jQuery Core - All 3.x Versions

jQuery Core - All 2.x Versions

jQuery Core - All 1.x Versions

jQuery Migrate - All Versions

Credit : code.jquery.com

Read More

Saturday, March 10, 2018

Dheeraj Punjabi

Top Html Interview Questions And Answers for Freshers.


Here I am sharing most asked HTML interview questions and their answers for  beginners. This list of HTML interview answers surly helpful for HTML beginners or web designers who just want to began their profession as a HTML designer. I recommend read out these interview questions before the interview. 

Question #1 - What is HTML?
HTML stands for Hypertext Markup Language. It is s markup language for World Wide Web. HTML was developed by Tim Berners Lee during 1990’s. It consists of tags which are used to define content and web page formatting.

Question #2 - Different versions of HTML?
HTML has numerous renditions since it initiations amid 1990's. HTML variant are HTML, HTML+, HTML 2.0, HTML 3.2, HTML 4.0 and the most recent form HTML 5.

Question #3 - What is the role of <!DOCTYPE>?
DOCTYPE stands for Document Type Declarations. DOCTYPE is used to specify the web browsers that which types of documents(such as SGML or XML Documents) it will receive. <!DOCTYPE> is declared above the <html> tag.

Question #4 - What are HTML tags?
HTML tags similar to keywords which has specifies function, for example, for paragraph we can use HTML tag(<p>). HTML tags mostly comes in pair like, <p>, </p>.

Question #5 - How do you create Tables in HTML?
HTML tables are created using <table> tags. To divide a HTML table, we have to use <tr>, which is table row. Likewise we <td> and <th>.

Question #6 - What is HTML Element?
An HTML component is everything from beginning to the closure of HTML tag. For instance, <p> This is a HTML Element</p>, in this case, from beginning tag to consummation label everything is HTML component and "This is a HTML Element" will be Element Content.

Question #7 - What is HTML Attribute?
HTML attribute adds extra data to the HTML Elements. For instance, <font size="5" color="green">, here size and color are html attributes.

Question #8 - What is Hyperlinks?
Hyperlinks are utilized to explore to another document with the assistance of content, picture or with a gathering of words.

Question #9 - Which are the basic editors for HTML?
There are various editors for designing in HTML like Notepad, Notepad++, EditPlus and WYSIWYG HTML editors etc. But mostly Notepad is using HTML Designers.

Question #10 - What are some of the common lists that can be used when designing a page?
Basically, HTML used some of the common lists these are following:-
– Ordered list
– Unordered list
– Definition list
– Menu list
– Directory list
Each of this list types makes use of a different tag set to compose.

Question #11 - Advantage of collapsing white space?
- This enables the designers to mastermind the HTML code in an efficient and intelligible organization.
- The browser collapses the multiple white spaces into a single white space in HTML.

Question #12 - How will you align a table to the right or left?
- For align the table to the right, we can use <TABLE ALIGN=" right">
- For align the table to the left, we can use <TABLE ALIGN=" left">

Question #13 - Does a hyperlink apply only to text?
No.
- The hyperlinks can be applied to both text as well as the images.
- This can be done simply by using <a href> tag.
- It means that even the images can become clickable links with a capability to take the visitor to the next page.

Question #14 - What are HTML forms?
HTML forms takes information and sends the data to the servers.

Question #15 - What are HTML blocks?
HTML blocks can be characterized by HTML tags like <span> and <div>.

Question #16 - What is the distinction amongst <div> and <span> components?
<div> tags are utilized to characterize segment in record blocks shrewd while <span> tag is utilized to characterize area in archives inline.

Question #17 - You need just a vertical scrollbar and no level scrollbar on your page. How might you do it?
- This should be possible by characterizing the frame with SCROLLING="auto" and having substance to simply fit into this frame.
- SCROLLING="yes" gets the scroll bar on both the sides, even when not required.
- SCROLLING="no" doesn't get the scrollbars by any stretch of the imagination, even when they are required.

Question #18 - What is <body> element in HTML document?
The <body> element characterizes the records body. It contains every one of the substance of the report (like content, pictures, hues, designs, and so on.).

Question #19 - What is image mapping in HTML?
Image map lets you connect to a wide range of site pages utilizing a single picture. You can characterize shapes in pictures that you need to make some portion of a image mapping.

Question #20 - What is the use of using alternative text in image mapping?
When you use image maps, it can easily become confusing and difficult to determine which hotspots corresponds with which links. Using alternative text lets you put a descriptive text on each hotspot link.

Question #21 - Differentiate between get and post method?
HTML techniques sends ask for utilizing get a post strategy. GET post ask for information from the server and POST is utilized to submit information to the server.

Question #22 - What bullet types are available?
With ordered lists, you can select to use a number of different list types including alphabetical and Roman numerals. The type attribute for unordered lists can be set to disc, square, or circle.

Question #23 - What is contained in HTML markup?
-Character-based data types 
-Several key components, including elements (and their attributes)
-Character references and entity references.
-Also the document type declaration.

Question #24 - What are the limitations when serving XHTML pages?
Maybe the greatest issue is the poor browser support XHTML as of now appreciates. Web Explorer and various other client specialists can't parse XHTML as XML. Accordingly, it isn't the extensible dialect it was guaranteed to be. There are numerous different issues. Take your pick.

Question #25 - What is difference between HTML and XHTML?
1. HTML is utilization of Standard Generalized Markup Language(SGML) while XML is use of Extensible Markup Language(XML).
2. HTML is a static Web Page while XHTML is dynamic Web Page.
3. HTML enables software engineer to perform changes in the labels and utilize property minimization though XHTML when client require another markup label then client can characterize it in this.
4. HTML is tied in with showing data though XHTML is tied in with depicting the data.


More About Interviewing:

Read More