2007-05-16から1日間の記事一覧

勝手属性を取得する

こんな感じ。 <html> <head> <script> </script> </head> <body> <a href="#" foo="bar" onclick="alert(this.getAttribute('foo'));">@</a> </body> </html> WindowsのIE6/FF2/OP9では属性fooを取得できた。 HTML的にアレだけど、spanやdivを追加するよりはこっちのほうがいいなぁ。

キーコード表示ページ

WEB

http://storehouse.sakura.ne.jp/key_event.html http://storehouse.sakura.ne.jp/event.html ローカルでいちいちファイルを作るのが面倒だったので、サーバにあげました。 適当にキーをたたくとキーコードを表示します。 追記 マウスのイベントも出力するよ…