87,917
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<script type="text/javascript">
var times = 0;
function change(btn) {
btn.style.background = times % 2 == 0 ? 'red' : 'white';
times++;
}
</script>
</head>
<body>
<input name="button1" type="button" value="点击试试" onclick="change(this)" />
</body>
</html>