Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Html exposing (..)
- import Html.Attributes exposing (..)
- import Html.Events exposing (on, targetValue)
- main =
- beginnerProgram { model = "", view = view, update = update }
- view model =
- div []
- [ select [ on "change" Html.Events.targetValue ]
- [ option [value "strawberry" ] [ text "strawberry" ]
- , option [value "chocolate" ] [ text "chocolate" ]
- , option [value "vanilla" ] [ text "vanilla" ]
- ]
- , div [] [ text (toString model) ]
- ]
- update msg model =
- model ++ (toString msg)
Add Comment
Please, Sign In to add comment