Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は明白なことを試しましたが、うまくいきません...
var dtel = document.getElementById("element-id"); dtel.value = new Date();
文字列が必要ですが、構文は何ですか?
多くの試行錯誤の後、次のことが機能することがわかりました。
var dtel = document.getElementById("element-id"); var dt = new Date(); dtel.value = dt.toISOString();