<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>点击按钮改变样式</title>
</head>
<body>
<h1 id="id1">我想要变色qwq</h1>
<button type="button" onclick="document.getElementById('id1').style.color='red'">
点我变色!</button>
</body>
</html>
点击按钮改变<p>样式
最新推荐文章于 2023-08-12 21:43:52 发布