<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>点击换</title>
<link id="skin" rel="stylesheet" type="text/css" href="06red.css">
</head>
<body>
<button οnclick="toRed();">变红</button>
<button οnclick="toGreen();">变绿</button>
</body>
<script>
function toRed()
{
document.getElementById('skin').href = '06red.css'
}
function toGreen()
{
document.getElementById('skin').href = '06green.css'}
</script>
</html>
js onclick点击事件改变皮肤
最新推荐文章于 2023-03-15 15:50:34 发布