<script type="text/javascript"> var lst = document.getElementById("<%= FileList.ClientID %>"); var count = 0; for (var i = 0; i < lst.options.length; i++) { var item = lst.options[i]; if (item.selected) { count++; break; } } if (count == 0) { alert("请选择"); } else { } </script>