I'm just wondering why this alert method in Click Event always firing when I'm selecting my select element.
Code:$('#Register').click(function () { if ($('#account_type').val() == "def") { alert('Please select an account type.'); return; } });
Code:<select id="account_type" class="form-control login-type" onchange="AccountType()"> </select>




Reply With Quote