DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
  • Ecosystem
  • Infrastructure
    • can-construct
    • can-control
    • can-event
    • can-event/async/async
    • can-event/batch/batch
    • can-observation
    • can-simple-map
    • can-util
      • can-util/dom
        • ./ajax/
        • ./attr/
          • special
            • focused
            • values
        • ./child-nodes/
        • ./class-name/
        • ./data/
        • ./dispatch/
        • ./document/
        • ./events/
        • ./frag/
        • ./mutate/
      • can-util/js
    • can-view-callbacks
    • can-view-live
    • can-view-model
    • can-view-nodelist
    • can-view-parser
    • can-view-scope
    • can-view-target
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Infrastructure
  • /
  • can-util
  • /
  • can-util/dom
  • /
  • ./attr/
  • /
  • special
  • /
  • values
  • / On this page
    • values

      property

      A special property that represents the selected values in a <select> element, usually a <select multiple>. The special property is needed because the DOM's native value property on a multiple select only gives you one of the selected options' values.

      • source

      Boolean

      Binding to values in your can-stache template is useful to get a list of the selected values:

      <select multiple {($values)}="colors">
          <option value="red">Red</option>
          <option value="green">Green</option>
          <option value="blue">Blue</option>
      </select>
      

      This will two-way bind to a "colors" property in the ViewModel.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.