let self=this;
let date=new Date();
if(date.getHours()>=0&&date.getHours()<12){
self.hoursTip="Good morning"
}else if(date.getHours()>=12&&date.getHours()<18){
self.hoursTip="Good afternoon"
}else{
self.hoursTip="Good night"
}
}
Read More:
- JavaScript determines whether parentheses are paired.
- ‘webpack dev server’ is not an internal or external command, nor is it a runnable program or batch file. Solution: error in cnpm run dev:
- Javascript: How to Use Date.Now() to implement front-end frequency limit
- [Solved] fatal error: cuda_runtime.h: No such file or directory
- [Solved] Vue-cli3 running or packaging error: JS memory overflow
- [Solved] Vue Error: template or render function not defined
- Element-plus Warning: ElementPlusError: [Util] binding value must be a string or number.
- [Solved] npm Error: Class extends value undefined is not a constructor or null
- [Solved] Error: EBUSY: resource busy or locked, lstat ‘D:\DumpStack.log.
- Error when Python executes JavaScript statement
- Javascript: Simple package localStorge operation
- JavaScript Common Errors List (Reasons & Solutions)
- Google browser plug-in JavaScript errors Notifier
- [Solved] Vue Compile Error: JavaScript heap out of memory
- [Solved] Project Package Error: Javascript heap out of memory
- Javascript: js websocket disconnected reconnect library ReconnectingWebSocket
- Node.js Error: “Error: EBUSY: resource busy or locked, stat“
- @requestbody: How to Use or Not Use
- [Solved] Vue3 npm ERR code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
- [Solved] Syntax Error: no such file or directory, open ‘F:\webProjectStudy\webProjectStudy\newStudy\24.d