As shown below:
var selector=$('<select></select>'); for(var i=0;i<5;i++){ selector.append('<option value="'+i+'">'+i+'</option>'); }
The above method of JQuery dynamically adding the Option element of Select is all the content shared by the editor. I hope It can give you a reference, and I hope you will support the PHP Chinese website.
For more articles related to JQuery’s method of dynamically adding Select’s Option element, please pay attention to the PHP Chinese website!