Pass values from one page to another without form and without passing in URL

前端 未结 5 1359
时光说笑
时光说笑 2021-01-26 22:45

I am working on a project where i need to access clean URL\'s always i.e no parameters can be passed in the URL for getting values on another page.

Can anyone please sug

5条回答
  •  北荒
    北荒 (楼主)
    2021-01-26 23:00

    For Clean URL's i prefer you may use HTTP POST Method. Hope that helps.

    Else, you can use AJAX with jQuery to submit the values to another page.

    $.ajax({url:"action.php",success:function(result){
      $("div").html(result);
    }}); 
    

    Check out w3schools to get started with AJAX : http://www.w3schools.com/jquery/jquery_ajax.asp

    No support for SESSION since i don't like writing php code inside my web page.

提交回复
热议问题