-1

我如何从 jquery 获取数据选择数据并将其传递到另一个页面,page2.php 到 page3.php。我只想将它保存在一个变量中并发布它,从 page3.php 我将获取数据。

function refreshPrices() {

   var beg=<?php echo isset($beg) ? $beg : 0 ?>;
   var inte=<?php echo isset($int) ? $int : 0 ?>;
   var advn=<?php echo isset($adv) ? $adv : 0 ?>;
   var currentTotalValue = 0;
    currentTotalValue = currentTotalValue + beg + inte + advn;
    $("#results div").each(function() {
        if (!isNaN(parseInt($(this).find("span").text().substring(1)))) {
            currentTotalValue += parseInt($(this).find("span").text().substring(1));
        }
    });


    $("#totalValue").text("$" + currentTotalValue)
}

$(document).ready(function() {

    $('#1').click(function() {
        //var row = $(this);
        if (($(this).attr('checked')) == 'checked') {
            $('#result').append("-PDF Document <html><span style=float:right>$100</span></html>");
        }
        else {
            $('#result').text("");
        }

        refreshPrices()


    });

    $('#2').click(function() {
        if (($(this).attr('checked')) == 'checked') {
            $('#result2').append("-Video <html><span style=float:right>$200</span></html> ");
        }
        else {
            $('#result2').text("");
        }

        refreshPrices()
    });
});
4

1 回答 1

1
window.location("page3.php?q="+data);

其中data是需要传递给其他页面的数据

于 2012-12-20T17:21:23.097 回答