我正在使用此代码检查是否在下拉列表中选择了一个值。
$(document).ready(function () {
$("send").click(function () {
if (document.getElementById('dropdown1').selectedIndex == 0)
$("#msg_dropdown1").html("Required");
});
$('#dropdown1').change(function(){$('#msg_dropdown1').hide()})
});
在选择一个值之前是否存在禁用提交按钮的方法?
<input type="submit" id="send" value="SEND" class="greyishBtn" />