-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 に答える