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......
detail
In the javascript has a similar function of PHP explode For example: var str="How are you doing today?";//Character string var n=str.split(" ");//String with a blank cut //n is array! alert(n);//will show How,are,you,doing,today? ...
detail
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......
detail
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......
detail
Sometimes encounter alert("Content") Need to display two lines of casesAt this time in the place you want to insert a line break "\n"For example: <script> alert("The first line of \n the second line \n the third line"); </script> ...
detail
Message Board
Feel free to leave suggestions and share! Thanksgiving!