html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<input type=text onpropertychange="a()">
<script>
function a(){alert(1)}
</script>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<input type=text onpropertychange="a()">
<script>
function a(){alert(1)}
</script>
</body>
</html>
本文介绍了一个简单的HTML页面示例,其中演示了如何使用onpropertychange事件触发JavaScript函数。当输入框属性发生变化时,将弹出警告框。
1万+

被折叠的 条评论
为什么被折叠?



