本文介绍了如何将标签中的值传递给会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<script type="text/javascript" src="ajax.googleapis/ajax/libs/jquery/1.5.1/jquery.min.js"> </script> <script type="text/javascript"> $(function () { //Column index value of price field (Column index start from 1) var columnIndexValue = 2; var checked = $('input:checkbox').click(function (e) { var total = 0; $("tr:has(:checkbox:checked) td:nth-child(" + columnIndexValue + ")").each(function () { total += parseInt($(this).text()); }); $('#lbl').text("your total is:" + total.toFixed()); }); }); </script>
如何传递标签
how to pass values which are in label
($(''#lbl'').text("your total is:" + total.toFixed());)中的值 使用session
to another page using session
推荐答案(function(){ //价格字段的列索引值(列索引从1开始) var columnIndexValue = 2; varchecked = (function () { //Column index value of price field (Column index start from 1) var columnIndexValue = 2; var checked =
('input:checkbox').click(function(e){ var total = 0; ('input:checkbox').click(function (e) { var total = 0;
("tr:has(:checkbox:checked)td:nth-child(" + columnIndexValue +)").each(function(){ 总计+ = parseInt( ("tr:has(:checkbox:checked) td:nth-child(" + columnIndexValue + ")").each(function () { total += parseInt(
更多推荐
如何将标签中的值传递给会话
发布评论