更新时间:2023-12-02 11:05:16
您可以禁用元素选择,或者您可以删除其名称属性。以下是一个示例代码段:
You can disabled element select or you could remove its name attribute. Here is a sample snippet:
$('#mylink').click(function(e){
e.preventDefault();
$('#myselect').prop('disabled','disabled').hide();
$('#myselect option').each(function(){
$('#mylist').append('<input type="checkbox" value="'+$(this).val()+'">'+$(this).val()+'</input>');
});
});