385 1
How to get current timestamp using javascript?

Hello, How can I get a timestamp in JavaScript? I need simple, understandable & easy code.

...
Type
Question
javascript timestamp in JavaScript
371 2
How to get difference between two dates in javascript?

I would like to get Difference between two dates using javascript or jQuery in simple way.

How can I do that, for example

...
Type
Question
javascript date difference
361 3
Datetime Format Regex (MM/dd/yyyy) Javascript

I want to validate the date format on every keypress/keyup that the user's typed.

I've researched for what i'm trying to achieve. And I've found the solution here:

https://stackoverflow.com/questions/36009414/regex-to-validate-date-yyyy-mm-dd-while-typing-on-keyup 

(i was referring to @bobble bubble's answered)

but the format was YYYY-mm-dd. So, I tried to reverse to the format i was looking for to (MM/dd/yyyy).

But i cant get throught with validating every press that the user's typed. What happend was its validate as whole(regex) not one by one.

I also read his explanation about non-capturing group. But still, i can't get it.

 

Happy Coding!

...
Type
Question
Javascript Regex
345 1
geolocation not working on safari browser,but its working fine on Chrome,IE,Mozila

I am using HTML5 geolocation which is not working on safari browser,but its working fine on Chrome,IE,Mozila,here is my current javascript code

...
Type
Question
html5 geolocation javascript
326 2
How to generate random string using javascript?

Hi, I would like to generate the random string using javascript? How can I achieve it?

Any length of string would work but if possible I would like to have a random string of 6 characters.

...
Type
Question
javascript random string generation

325 1
How to strip out only Text from HTML string using javascript?

Suppose I have an HTML string like below:

...
Type
Question
javascript HTML strip HTML from a string
313 1
How to implement validation for input type file using jQuery or javascript?

Hello, I have a HTML form inside which there is <input type="file" /> field, and now before posting form to the server side, I need to validate/check if file field is empty or not, I want user to upload atleast one image file in this field, so how I can implement validation message for <input type ="file" /> field in the form using jQuery or javascript code?

Sample HTML Form

...
Type
Question
HTML Javascript file input validation
288 1
What's the difference between let and var in JavaScript?

Hello, as I am not very well versed with javascript, I would like to know the difference between let and var keyword of javascript?(With example if possible)

Or Any reference link with proper details will also work, thanks

...
Type
Question
javascript let var
231 1
How to clone object in JavaScript?

I was trying to copy/clone the object and edit the new one but whenever I change edit NewObject, olderObject also get's changed, suppose here is my Object

...
Type
Question
Javascript clone object clone array
229 1
How to get response data from XMLHttpRequest?

I was trying to get location by calling google maps API using javascript and wanted to know how to get response text/data after request is successfully sent.

Here is my javascript code:

...
Type
Question
Javascript google maps reverse geocoding

Page 5 of 6