0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

IE9 と属性 expando の罠

Posted at

例えば input 要素の max 属性の値を取得しようとして

hoge = input.max

とかすると、

  • IE8 以下は内容属性がそのままJavaScriptの property としてアクセスできる
  • IE10 以上は max 属性に対応している

のでちゃんと値が取れるのだけど、

  • IE9 は max 属性に対応しておらず、未知の内容属性に property としてアクセスできない

ので undefined になる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?