Check Uncheck all html CheckBox controls using jQuery:
Check Uncheck all html CheckBox using jQuery:
In
this post we describe select checkbox in asp.net using jquery. here we take two
list and use jquery code.
CheckBox using jQuery:
<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
body
{
font-family: Calibri;
font-size: 12pt;
padding: 10px;
}
</style>
<script type="text/jscript">
$(document).ready(function () {
$("input[name='tech']").filter(':even').attr('disabled',
true);
$("input[name='hobbies']").filter(':odd').attr('disabled',
true);
});
</script>
</head>
<body>
<div align="center">
<h1>Checkbox in asp.net using Jquery: </h1>
<div align="left"
style="width:400px; border:2" >
<b>1st Checkbox List: </b>
<br />
<input type="checkbox"
name="tech"
value="jQuery"
/>jQuery
<br />
<input type="checkbox"
name="tech"
value="JavaScript"
/>JavaScript
<br />
<input type="checkbox"
name="tech"
value="Prototype"
/>Prototype
<br />
<input type="checkbox"
name="tech"
value="Dojo"
/>Dojo
<br />
<input type="checkbox"
name="tech"
value="Mootools"
/>Mootools
<br />
<br />
<b>2nd Checkbox List: </b>
<br />
<input type="checkbox"
name="hobbies"
value="Sports"
/>Sports
<br />
<input type="checkbox"
name="hobbies"
value="Racing"
/>Racing
<br />
<input type="checkbox"
name="hobbies"
value="Singing"
/>Singing
<br />
<input type="checkbox"
name="hobbies"
value="Writing"
/>Writing
<br />
<input type="checkbox"
name="hobbies"
value="Travelling"
/>Travelling
<br />
<input type="checkbox"
name="hobbies"
value="Cooking"
/>Cooking
<br />
</div>
</div>
</body>
Other asp.net checkbox related post:
Other Asp.net related Post:
- code for java script validation in
- use of file upload control in asp.net
- ajax controls.html
- what is cookies and how to create
- windows communication foundation
- example of crystal report
- Hide radio buttons in javascript
- Session management in .net programming
- Example of session management.
- Data type in c with asp.net.html
- Declear_pointeri_.net_programming
- Declare pointer in asp.net.html
- Web services in asp.html
- How to set current data into asp text.html
- Validate ASP.Net RadioButtonList using JavaScript Example.
- jquery disable or Enable submit button after validation
- Enable Disable Submit Button using jQuery
Comments
Post a Comment