<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script src="jquery-1.11.js" type="text/javascript"></script>
<title>演示</title>
</head>
<body>
<input type="text" id="deptInput">
</body>
<script type="text/javascript">
$("#deptInput").on('input propertychange', function(){
if (this.value) {
alert(this.value)
} else {
}
});
</script>
</html>
监听输入框的输入变化
最新推荐文章于 2023-12-29 23:26:56 发布
