Mercurial > urweb
annotate tests/mouseEvent.ur @ 2074:e48e09a1f583
HTML5 input attributes: placeholder, required, autofocus; email input type (without cformTag equivalent)
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Sun, 12 Oct 2014 10:03:36 +0000 |
parents | 5bc4fbf9c0fe |
children |
rev | line source |
---|---|
adam@1783 | 1 val show_mouseButton = mkShow (fn b => case b of |
adam@1783 | 2 Left => "Left" |
adam@1783 | 3 | Middle => "Middle" |
adam@1783 | 4 | Right => "Right") |
adam@1783 | 5 |
adam@1783 | 6 fun main () : transaction page = return <xml><body> |
adam@1783 | 7 <button onclick={fn ev => alert ("ScreenX = " ^ show ev.ScreenX |
adam@1783 | 8 ^ "\nScreenY = " ^ show ev.ScreenY |
adam@1783 | 9 ^ "\nClientX = " ^ show ev.ClientX |
adam@1783 | 10 ^ "\nClientY = " ^ show ev.ClientY |
adam@1783 | 11 ^ "\nCtrlKey = " ^ show ev.CtrlKey |
adam@1783 | 12 ^ "\nShiftKey = " ^ show ev.ShiftKey |
adam@1783 | 13 ^ "\nAltKey = " ^ show ev.AltKey |
adam@1783 | 14 ^ "\nMetaKey = " ^ show ev.MetaKey |
adam@1783 | 15 ^ "\nButton = " ^ show ev.Button)}/> |
adam@1783 | 16 </body></xml> |