jq monitors the select value to step on the pit

			$("#wNoSelect").change(()=>{
				console.log($(this).get(0))//指向window
				console.log($(this).val())//报错jquery-3.2.0.min.js:4 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
			})		
			$("#wNoSelect").change(function(){
				console.log($(this).get(0)) //获取到select元素
				console.log($(this).val(0)) //获取到下拉选中的值
			})

Reason: function and ()=> this point is different

Guess you like

Origin blog.csdn.net/weixin_43939111/article/details/112861316