要传递值,我们假设我们的<a>是以下内容,页面为new.html,
<a href="new.html?structure='123'">Structure</a>
JS将是:
$( document ).on( "pageinit", "#new", function( event ) { var myParam = $(this).data("url").split("?")[1]; myParam = parameters.replace("structure=",""); alert(myParam); });