2009-10-09 33 views

回答

3

爲了詳細說明@BoltBait - 這是一個基本的例子,使用JQuery +的cookie plugin

在第一頁

<script type="text/javascript"> 
    // set the cookie, on click to the next page 
    $("#next-page").click(function() { 
     $.cookie("INPUTBOX",$("input[name=inputbox]").val()); 
    }); 
</script> 

而接下來的頁面上

<script type="text/javascript"> 
    // get the cookie, we are now on the next page 
    alert($.cookie("INPUTBOX")); 
</script> 

希望這幫助

+0

謝謝,真的很有幫助 - 非常感謝 –

0

你可以做到這一點使用Cookie,如果這兩個網頁是相同的Web服務器上。

+0

你可以用一個代碼示例,請詳細說明任何可能的? –