Movatterモバイル変換


[0]ホーム

URL:


  1. 開発者向けのウェブ技術
  2. Web API
  3. HTMLInputElement
  4. max

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docsコミュニティーについてもっと知り、仲間になるにはこちらから。

View in EnglishAlways switch to English

HTMLInputElement: max プロパティ

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月.

maxHTMLInputElement インターフェイスのプロパティで、この<input> 要素のmax 属性を反映します。この属性は通常、数値または日付時刻入力の有効な最大値を定義します。この属性が明示的に設定されていない場合、max プロパティは空文字列となります。

この要素のmax を表す文字列、またはmax が明示的に設定されていない場合は空文字列です。

js
const inputElement = document.querySelector("#time");console.log(inputElement.max); // max 属性の現在の値inputElement.max = "18:00:00"; // max 値を午後 6 時に設定

仕様書

Specification
HTML
# dom-input-max

ブラウザーの互換性

関連情報

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp