如何将标签中的值传递给会话 [英] How to pass the values which are in label to session

查看:64
本文介绍了如何将标签中的值传递给会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<script type="text/javascript" src="https://ajax.googleapis.com/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(


这篇关于如何将标签中的值传递给会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆