Today to check the project found that there is a bug, due to the requirements of the SQL statement, the front page is displayed in the background when the time to 1 days,
On-line view of other people wrote, found some loopholes, through my own summary, wrote to meet my requirements
1 varstr = $ (' Foreground acquisition Time '). Val (). Slice (5) + "-" + $ (' Front desk access time '). Val (). Slice (0, 4); 2 var d = new Date (str); 3 d.setdate (D.getdate () +1);4 var d3 = new Date (D.getfullyear (), D.getmonth (), d.getdate ());5 var month=returnmonth (D3.getmonth ()); 6 var day=d3.getdate ();7 day=day<10? " 0 "+day:day; 8 var finally gets the time time=d3.getfullyear () + "-" +month+ "-" +day; 9 function Returnmonth (num) {Ten var str= ""; One switch (num) { A Case 0:str= "01"; Break - Case 1:str= "02"; Break - Case 2:str= "03"; Break the Case 3:str= "04"; Break - Case 4:str= "05"; Break - Case 5:str= "06"; Break - Case 6:str= "07"; Break + Case 7:str= "08"; Break - Case 8:str= "09"; Break + Case 9:str= "10"; Break A Case 10:str= "11"; Break at Case 11:str= "12"; Break - } - return str; -}
I hope my writing is helpful to others.
JavaScript Date Add one more day method