How could I get the current day and current time with AM/PM of computer using jQuery
I want to show current day and time(HH:MM) with AM/PM on my page. How to achi开发者_运维知识库eve this task in jQuery. I have done above thing using JavaScript but I just want to know how to do this task in jQuery easily as per the require.
jQuery is just a Javascript library. It doesn't have any special methods for handling dates, so it's no help for you in that aspect.
The only thing that it can help you with is to display the date once you have formatted it into a string. Example:
var formattedDate = SomeMethodToGetTheFormattedDate();
$('#IdOfElementForDisplayingDate').text(formattedDate);
精彩评论