HTMLInputElement: type ããããã£
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since â¨2015å¹´7æâ©.
type 㯠HTMLInputElement ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®ããããã£ã§ã <input> è¦ç´ ãå
¥åããéã«è¨±å¯ããããã¼ã¿ã®åï¼æ°å¤ãæ¥ä»ãã¡ã¼ã«ã¢ãã¬ã¹ãªã©ï¼ã示ãã¾ãããã©ã¦ã¶ã¼ã¯é©åãªã¦ã£ã¸ã§ããã鏿ããã¦ã¼ã¶ã¼ãæå¹ãªå¤ãå
¥åã§ããããã«æ¯ãèãã¾ãã
å¤
åã表ãæååã§ãã
åãããå¤ã®ä¸è¦§ã¯ãã®å±æ§ã®å ¥ååã®ç¯ã«ããã¾ãã
ä¾
>HTML
html
<input id="input1" type="date" />
JavaScript
js
const inputElement = document.querySelector("#input1");
console.log(inputElement.type); // Output: "date"
仿§æ¸
| Specification |
|---|
| HTML > # dom-input-type > |
ãã©ã¦ã¶ã¼ã®äºææ§
é¢é£æ å ±
HTMLTextAreaElement.typeããããã£HTMLButtonElement.typeããããã£