Last active
April 28, 2022 17:07
-
-
Save ivancorrales/dafcf99bcb2cf8ab6d2a71dd5620f93c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"syscall/js" | |
"time" | |
) | |
func main() { | |
currentTime := time.Now().Format("2006-01-02 15:04:05") | |
h2Element := js.Global().Get("document"). | |
Call("getElementById", "description") | |
msg := fmt.Sprintf( | |
"Sample 2 | Modifying the HTML (%s)", | |
currentTime) | |
h2Element.Set("innerHTML", msg) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment