jQuery 实时监听input的输入内容!

		//jQuery 实时监听input的输入内容!
		
		

		//1、jQuery
		$("#showX").bind("input propertychange",function(event){
			console.log($(this).val());
		})
		//2、原生
		function onInput (event) {
			console.log (event.target.value);
		}	

 

你可能感兴趣的:(js)