Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
4
  • getYear function creates only after the document is ready. Move the function declaration outside the ready callback Commented Apr 19, 2019 at 19:35
  • You've declared your function inside the "ready" handler. That makes it unavailable to anything outside that scope. Commented Apr 19, 2019 at 19:35
  • That works! Thanks! Commented Apr 19, 2019 at 19:37
  • 1
    Why is document.write considered a "bad practice"? Commented Apr 19, 2019 at 19:41

default

AltStyle によって変換されたページ (->オリジナル) /