<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>全选和反选</title>
</head>
<body>
<input type="button" value="全选" id="a">
<script type="text/javascript">
var a=document.getElementById("a");
a.onclick=function(){
if(this.getAttribute("value")=="全选"){
this.setAttribute("value")=="反选";
}else{
this.setAttribute("value")=="全选";
}
}
</script>
</body>
</html>
fdsgasgg