screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Timestamp Display</title> </head> <body> <h1>Javascript Current Timestamp</h1> <button onclick="displayTimestamp()">Click to Display Timestamp</button> <p id="timestampDisplay"></p> <script> function displayTimestamp() { const currentTimestamp = new Date().getTime(); const timestampInSeconds = Math.floor(currentTimestamp / 1000); const displayElement = document.getElementById('timestampDisplay'); displayElement.innerHTML = `Current Timestamp: ${timestampInSeconds} `; } </script> </body> </html>