hi, consider you have these controls on your page:
<div id="myDiv">
my div text
</div>
<input type="text" id="txt1" />
<select id="ddl1">
<option value="1">Test</option>
<option value="2">Test 2</option>
</select>
<input type="checkbox" id="chk1" /><label for="chk1">Check Box</label>
<input type="button" id="btn1" value="Get Value" onclick="GetValues();"/>
now on the button click call this javascript function to get all controls values like this:
<script type="text/javascript">
function GetValues() {
alert("my DIV content is " + $('#myDiv').html());
alert("my text box value is " + $('#txt1').val());
alert("my dropdownlist selected text is " + $('#ddl1 option:selected').text());
alert("my checkbox is " + $('#chk1').attr('checked'));
}
</script>
Note that you have to add the jQuery reference in your Head tag