Javascript time how to compare?

Hello everyone!Recently I met a demand of the time required to verify inputI will write this //Here is the time to check var goTime = '2016-01-20 12:00'; //Verify time format, here I would like to use 2016-01-21 14:04 if (goTime.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$/) == null )//Tim......


[javascript] function to verify the existence of

Hello everyone! In javascriptSometimes requires the use variable call functionSo I went to the Function //Assuming the Function name is fName fName = 'myFunction'; //Established Function to test function myFunction() { alert('this is myFunction! '); } //Check Function names are present //If there t......


[JavaScript] [Find String] indexOf ()

There are ways to find the string in javascript Is to use indexOf () To find the string Such as var str="Hello Zoearth!" alert(str.indexOf("Zoe")); //is 6 alert(str.indexOf("Hello")); //is 0 alert(str.indexOf("Moon")); //is -1 It should be noted that when the position is zero when foundDirect judgm......


Message Board

Feel free to leave suggestions and share! Thanksgiving!

comments powered by Disqus