How to submit other properties of the selected option when submitting a select with an form form

how do I get some attributes of the selected option in the select element when submitting with the form form?
for example, foodsid foodsenname foodscnname in the following code, wait for the attribute

<select name="foods" id="foods" class="bottom_add_foods">
    <option foodsid="111" foodsenname="kkk" foodscnname=""></option>
    <option foodsid="222" foodsenname="xxx" foodscnname=""></option>
    <option foodsid="333" foodsenname="hhh" foodscnname=""></option>
</select>
Mar.22,2021

try binding an object with value? For example,

value="{ foodsid: '111', foodsenname: 'kkk', foodscnname: '' }"

then get the value in js and convert the JSON.parse to an object


<select name="foods" id="foods" class="bottom_add_foods">
        <option value="111_kkk_"></option>
        <option value="111_xxx_"></option>
        <option value="333_hhh_"></option>
    </select>

$("- sharpfoods"). Find ("option:selected"). Attr ("foodsid");


option object .getAttribute ("foodsid");

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3dd1c-2c3b9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3dd1c-2c3b9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?