HTML - how to assign a value to a div tag similar to an option tag -


i want give div tag hidden value. can done done option tags?

html

        <select>             <option value="bread">field 1</option>             <option value="butter">field 2</option>             <option value="milk">field 3</option>         </select> 

use data-* attributes (e.g. data-food): https://developer.mozilla.org/en-us/docs/web/guide/html/using_data_attributes


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -