<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">
//开始弹框
function popupon() {
var popup = document.getElementById("popup");
popup.style = "display: block;";
}
//取消弹窗
function popupoff() {
var popup = document.getElementById("popup");
popup.style = "display: none;";
}
//点击单选款,改变背景色
function changeradtimecolor() {
var obj = document.getElementsByName("radtime");
for(var i=0; i<obj.length; i ++){
if(obj[i].checked){
if(obj[i].value == 3){
var diva = document.getElementById("rpa");
diva.style.backgroundColor = "#8d9cb1";
document.getElementById("rpb").style.backgroundColor = "#3c4153";
document.getElementById("rpc").style.backgroundColor = "#3c4153";
document.getElementById("rpd").style.backgroundColor = "#3c4153";
document.getElementById("rpe").style.backgroundColor = "#3c4153";
}
if(obj[i].value == 15){
var divb = document.getElementById("rpb");
divb.style.backgroundColor = "#8d9cb1";
document.getElementById("rpa").style.backgroundColor = "#3c4153";
document.getElementById("rpc").style.backgroundColor = "#3c4153";
document.getElementById("rpd").style.backgroundColor = "#3c4153";
document.getElementById("rpe").style.backgroundColor = "#3c4153";
}
if(obj[i].value == 30){
var divc = document.getElementById("rpc");
divc.style.backgroundColor = "#8d9cb1";
document.getElementById("rpa").style.backgroundColor = "#3c4153";
document.getElementById("rpb").style.backgroundColor = "#3c4153";
document.getElementById("rpd").style.backgroundColor = "#3c4153";
document.getElementById("rpe").style.backgroundColor = "#3c4153";
}
if(obj[i].value == 365){
var divd = document.getElementById("rpd");
divd.style.backgroundColor = "#8d9cb1";
document.getElementById("rpa").style.backgroundColor = "#3c4153";
document.getElementById("rpb").style.backgroundColor = "#3c4153";
document.getElementById("rpc").style.backgroundColor = "#3c4153";
document.getElementById("rpe").style.backgroundColor = "#3c4153";
}
if(obj[i].value == 0){
var dive = document.getElementById("rpe");
dive.style.backgroundColor = "#8d9cb1";
document.getElementById("rpa").style.backgroundColor = "#3c4153";
document.getElementById("rpb").style.backgroundColor = "#3c4153";
document.getElementById("rpc").style.backgroundColor = "#3c4153";
document.getElementById("rpd").style.backgroundColor = "#3c4153";
}
}
}
}
</script>
<style>
/*隐藏单选框的,方便被div覆盖*/
label input[type="radio"] {
appearance: none;
-webkit-appearance: none;
outline: none;
margin: 0;
vertical-align: text-bottom;
margin-right: 0.1rem;
}
/*透明背景*/
.popup-w{
/*display: block;*/
display:none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.3);/*透明背景,可调透明度*/
z-index: 999;
}
.popup{/*弹窗*/
box-sizing: border-box;
position: absolute;
width: 600px;
height: 437px;
background: #181c28;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
text-align: center;
border-radius: 25px;
}
.popup-da{
width: 600px;
height: 25px;
margin-top: 42px;
font-size: 20px;
font-family: SourceHanSansCN-Regular;
color: #8d9cb1;
}
.popup-daa{
float: left;
margin-left: 40px
}
.popup-dab{
float: right;
margin-right: 140px
}
.popup-db{
width: 600px;
height: 25px;
padding: 38px 0 0 0;
font-size: 20px;
font-family: SourceHanSansCN-Regular;
color: #8d9cb1;
}
.popup-dba{
float: left;
margin-left: 40px
}
.popup-dbb{
float: left;
font-size: 18px;
font-family: SourceHanSansCN-Regular;
text-align: center;
color: #ffffff;
}
/* 选中后背景颜色改为字体颜色,字体颜色改为白色*/
.popup-dbba{
width: 48px;
height: 23px;
float: left;
background: #3c4153;
color: #FFFFFF;
border: 1px solid #8d9cb1;
border-radius: 5px
}
.popup-dbbb{
width: 66px;
height: 23px;
float: left;
margin-left: 20px;
background: #3c4153;
color: #FFFFFF;
border: 1px solid #8d9cb1;
border-radius: 5px
}
.popup-dbbc{
width: 48px;
height: 23px;
float: left;
margin-left: 20px;
background: #3c4153;
color: #FFFFFF;
border: 1px solid #8d9cb1;
border-radius: 5px
}
.popup-dc{
width: 600px;
height: 25px;
padding: 38px 0 0 0;
font-size: 20px;
font-family: SourceHanSansCN-Regular;
color: #8d9cb1;
}
.popup-dca{
float: left;
margin-left: 40px
}
.popup-dcb{
float: left;
font-size: 18px;
font-family: SourceHanSansCN-Regular;
text-align: center;
color: #ffffff;
}
/*选中后背景颜色改为字体颜色,字体颜色改为白色*/
.popup-dcba{
width: 80px;
height: 23px;
float: left;
background: #3c4153;
color: #FFFFFF;
border: 1px solid #8d9cb1;
border-radius: 5px
}
.popup-dcbb{
width: 80px;
height: 23px;
float: left;
margin-left: 20px;
background: #3c4153;
color: #FFFFFF;
border: 1px solid #8d9cb1;
border-radius: 5px
}
.popup-dd{
width: 600px;
height: 125px;
padding: 38px 0 0 0;
font-size: 20px;
font-family: SourceHanSansCN-Regular;
color: #8d9cb1;
}
.popup-dda{
float: left;
margin-left: 40px
}
.popup-ddb{
float: left;
font-size: 18px;
font-family: SourceHanSansCN-Regular;
text-align: center;
color: #ffffff;
}
.popup-ddbtxt{
width: 412px;
height: 120px;
background: #3c4153;
font-size: 20px;
color: white;
}
.popup-de{
width: 600px;
height: 30px;
padding: 25px 0 0 0;
font-size: 20px;
font-family: SourceHanSansCN-Regular;
color: #8d9cb1;
}
.popup-dea{
float: left;
margin-left: 197px;
width: 60px;
height: 30px;
background: #448aca;
border-radius: 5px;
}
.popup-deb{
float: right;
margin-right: 198px;
width: 60px;
height: 30px;
background: #448aca;
border-radius: 5px;
}
</style>
</head>
<body>
<input type="button" οnclick="popupon()" value="弹窗"/>
<!--弹窗-->
<div class="popup-w" id="popup"><!--透明窗,可调节透明度-->
<div class="popup"><!--显示窗-->
<div class="popup-da">
<div class="popup-daa" id="punishname">封禁昵称:小明</div>
<div class="popup-dab" id="punishid">封禁ID:11111</div>
</div>
<div class="popup-db">
<div class="popup-dba">违规类型:</div>
<div class="popup-dbb">
<div class="popup-dcba" id="colora">
<label><input class="rada" type="radio" name ="radtime" value="3" />匹配违规</label>
</div>
<!-- <div class="popup-dbbb" id="colorb">
<label><input class="radb" type="radio" name ="radtime" value="15" οnclick="changeradtimecolor()" />聊天违规</label>
</div>
<div class="popup-dbbb" id="colorc">
<label><input class="radb" type="radio" name ="radtime" value="30" οnclick="changeradtimecolor()" />评论违规</label>
</div>
<div class="popup-dbbc" id="colord">
<label><input class="radc" type="radio" name ="radtime" value="365" οnclick="changeradtimecolor()" />作品违规</label>
</div>
<div class="popup-dbbc" id="colore">
<label><input class="radc" type="radio" name ="radtime" value="0" οnclick="changeradtimecolor()" />其他</label>
</div>-->
</div>
</div>
<div class="popup-dc">
<div class="popup-dca">封禁时长:</div>
<div class="popup-dcb">
<div class="popup-dbba" id="rpa">
<label><input type="radio" value="3" name = "radtime" οnclick="changeradtimecolor()" />三天</label>
</div>
<div class="popup-dbbb" id="rpb">
<label><input type="radio" value="15" name = "radtime" οnclick="changeradtimecolor()" />十五天</label>
</div>
<div class="popup-dbbb" id="rpc">
<label><input type="radio" value="30" name = "radtime" οnclick="changeradtimecolor()" />三十天</label>
</div>
<div class="popup-dbbc" id="rpd">
<label><input type="radio" value="365" name = "radtime" οnclick="changeradtimecolor()" />一年</label>
</div>
<div class="popup-dbbc" id="rpe">
<label><input type="radio" value="0" name = "radtime" οnclick="changeradtimecolor()" />永久</label>
</div>
</div>
</div>
<div class="popup-dd">
<div class="popup-dda">封禁原因:</div>
<div class="popup-ddb">
<textarea id="txtcont" class="popup-ddbtxt" maxlength="60" placeholder="输入不得超过60个字"></textarea>
</div>
</div>
<div class="popup-de">
<input class="popup-dea" type="button" value="取消" οnclick="popupoff()" />
<input class="popup-deb" type="button" value="确定" οnclick="insertBlockadebyreport()"/>
</div>
</div>
</div>
</body>
</html>