You will need to store the count variable on a server-side control in order to do this.
Example:
<script type="text/javascript">
var count = 0;
jQuery('td').click(function () {
if ($(this).hasClass('process')) {
count = count + 100;
alert(count);
// Store the value in the control
$('#<%= example.ClientID %>').val(count);
}
});
</script>
<asp:HiddenField ID="example" runat="server" />
Then, in your code-behind simply use:
int value;
if (Int32.TryParse(example.Value, out value))
{
// Do something with your value here
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…