jQuery Mobile: Sending data from one page to the another

jQueryJavascriptWeb DevelopmentFront End Scripts

To pass values, let us say our <a> is the following, with page new.html,

<a href="new.html?structure='123'">Structure</a>

The JS will be:

$( document ).on( "pageinit", "#new", function( event ) {
   var myParam = $(this).data("url").split("?")[1];
   myParam = parameters.replace("structure=","");
   alert(myParam);
});
raja
Published on 11-Apr-2018 07:56:10
Advertisements