<%@ page language= "C #" autoeventwireup= "true" codebehind= "WebForm6.aspx.cs" inherits= "wzgyd. WEBFORM5 "%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title> Untitled Page </title>
<link href= "Stylesheet1.css" rel= "Stylesheet" type= "Text/css"/>
<script src= "Js/jquery-1.8.3.js" type= "Text/javascript" ></script>
<script type= "Text/javascript" >
/*checked Select all */
function Clickall () {
if ($ ("#Check0"). attr ("checked")) {
$ ("Input[name= ' Check ']"). attr ("Checked", true);
$ (". Body1"). CSS ("Background-color", "#92c0f1");
}else {
$ ("Input[name= ' Check ']"). attr ("checked", false);
$ (". Body1"). CSS ("Background-color", "#ffffff");
}
}
/*checked Select all */
function ClickAll2 () {
if ($ ("#Check4"). attr ("checked")) {
$ (". Body1"). CSS ("Background-color", "#92c0f1");
$ ("Input[name= ' Check ']"). attr ("Checked", true);
}else {
$ (". Body1"). CSS ("Background-color", "#ffffff");
$ ("Input[name= ' Check ']"). attr ("checked", false);
}
}
Register the Click event for a checkbox
$ (document). On (' Click ', ': CheckBox ', function (e) {
Stop event bubbling, when clicked is a checkbox, does not execute the parent div's Click
E.stoppropagation ();
var Ock = $ (this), Parentdiv = Ock.parent (). parent ();
Ock.prop (' checked ')? Parentdiv.css (' Background-color ', ' #fff4e8 '): Parentdiv.css (' Background-color ', ');
if (Ock.prop (' checked ')) {
Parentdiv.css (' Background-color ', ' #92c0f1 ')
}else{
Parentdiv.css (' Background-color ', ');
$ ("#Check0, #Check4"). attr ("checked", false);
}
});
</script>
<body id= "Table2" >
<form id= "Form1" runat= "Server" >
<div style= "Height:auto; width:990px; Color:gray; border:0px; Border:solid 0.2px #f0f0f0; Font-family: Microsoft Jacob Black; >
<%--<div style= "width:200px; height:728px; Float:left;border:solid 0.2px #f0f0f0; " ></div>--%>
<div style= "margin-left:20px; width:990px; height:726px; Float:left; margin-left:8px; ">
<div style= "HEIGHT:28PX;" >
<div class= "head0" style= "margin-left:20px; Color:black; " > select Demand Plan </div>
<div style= "float:right;" ><a href= "#" ><<</a> 1/3 <a href= "#" >>></a></div>
</div>
<div style= "HEIGHT:14PX;" ></div>
<div class= "Body0" >
<div style= "Float:left;" ><input type= "checkbox" id= "Check0" name= "Check" onclick= "Clickall ()"/> Select all </div>
<div style= "width:40px; Float:left; height:43px; " ></div>
<div style= "width:50px; Float:left; " > Program Number </div>
<div style= "WIDTH:269PX; Float:left; height:43px; " ></div>
<div style= "WIDTH:51PX; Float:left; " > Program Name </div>
<div style= "WIDTH:295PX; Float:left; height:43px; " ></div>
<div style= "WIDTH:55PX; Float:left; " > Entry Date </div>
</div>
<DIV><HR/></div>
<div style= "height:35px;" ></div>
<div class= "Body1" >
<div class= "Body2" ><div class= "Body2" style= "HEIGHT:9PX;" ></div><input type= "checkbox" id= "Check1" name= "Check"/></div>
<div class= "Body3" ></div>
<div class= "Body5" >11252512</div>
<div class= "Body6" ></div>
<div class= "Body7" >xx plan </div>
<div class= "Body8" >
</div>
<div class= "Body10" >2015-8-9</div>
<div class= "Body11" >
<div class= "Body18" ></div>
<div> Material Details </div>
</div>
</div>
<div class= "Body12" ></div>
<div class= "BODY13" ></div>
<div class= "Body1" >
<div class= "Body2" ><div class= "Body2" style= "HEIGHT:9PX;" ></div><input type= "checkbox" id= "Checkbox1" name= "Check"/></div>
<div class= "Body3" ></div>
<div class= "Body5" >11252512</div>
<div class= "Body6" ></div>
<div class= "Body7" >xx plan </div>
<div class= "Body8" >
</div>
<div class= "Body10" >2015-8-9</div>
<div class= "Body11" >
<div class= "Body18" ></div>
<div> Material Details </div>
</div>
</div>
<div class= "Body12" ></div>
<div class= "BODY13" ></div>
<%--<div class= "BODY14" >
<div class= "BODY15" >
<input type= "checkbox" id= "Check4" name= "Check" onclick= "ClickAll2 ()"/> Select all
</div>
<div class= "BODY16" > Delete selected Items </div>
<div class= "BODY16" > Move to my concerns </div>
<div style= "WIDTH:76PX; Height:53px;float:left; " ></div>
<div style= "WIDTH:197PX; Height:53px;float:left; " >
<div style= "width:170px; Float:left; " > Total Price (Shipping not included): 666.00 RMB </div>
<div style= "WIDTH:169PX; Float:left; " > Saved: $100.00 </div>
</div>
<div class= "Body17" > Go settlement </div>
</div>--%>
</div>
</div>
</form>
</body>
jquery Full Menu selection function