how to get the User's Time of Day
Answer / Upendra Kumar Raj
To get the user's current time, you can use JavaScript's built-in `Date` object. Here's an example:nn```javascriptnconst now = new Date();nconst hours = now.getHours().toString().padStart(2, '0');nconst minutes = now.getMinutes().toString().padStart(2, '0');nconsole.log(`Current time is: ${hours}:${minutes}`);n```
| Is This Answer Correct ? | 0 Yes | 0 No |
write a program segment that will ask the user if he wants to computer the perimeter of the area of the triangle. if the perimeter is wanted, ask the measure of the three sides and compute for the perimeter. if the area is wanted, ask for the measures of the base and height and compute for the area. display the computed value
how to create a Draggable element
code to keep a page Out of the browser history
how to pass data between pages using URLs
program to show a progress bar
how to copy form data between different pages
determine which Element received an Event
I have a doubt regarding including tags in a function. I have written a function in javascript in a html page. The function got called by clicking a button, i want to display the results in same html page by placing tags in the function. (this hmtl page is static page) Is this possible? example: <SCRIPT LANGUAGE=javascript> function calSubmit_onclick() { var xyz=0; .......... .......... document.write("<lable>"+xyz+"</label>"); /*Is it possible*/ }
code to sorting an array of objects
how to create an anonymous function
program that will accept any name and will be stored in an array
Reading which Character Key was pressed