How can multipleselect be used in the form submission page to get the selected value?

problem description

formmultipleselect

the environmental background of the problems and what methods you have tried

js

related codes

/ / Please paste the code text below (do not replace the code with pictures)
$("- sharpmultiselect") .change (function () {

         $("select :selected").each(function() {
            str +=","+$(this).val();
         });
         //strformaction
});

what result do you expect? What is the error message actually seen?


the official http://api.jquery.com/val/ document contains the following description

When the first element in the collection is a select-multiple (i.e., a select element with the multiple attribute set), .val () returns an array containing the value of each selected option. As of jQuery 3.0, if no options are selected, it returns an empty array; prior to jQuery 3.0, it returns null.

so the following code can get the selected value

<select id="elem" multiple="multiple">
    <option>...</option>
    ...
</select>
var values = $('-sharpelem').val();
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-1b35f96-2bfcb.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-1b35f96-2bfcb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?