var Register = function () { this.Startup = function () { $('#select').on('click', this.OnSelectChange.bind(this)); }; this.OnSelectChange = function () { var option = $("#select option:selected"); console.log(option.val()); if (option.val() !== '请选择') { $('#select').css({ color: '#3a3a3a', fontSize: '16px' }); } else { $('#select').css({ color: '#868686', fontSize: '14px' }); } }; }; $(document).ready(function () { var register = new Register(); register.Startup(); });