效果图:
页面 1:
页面 2:
页面 1 代码
<!DOCTYPE html>
<html>
<head>
<title>Demo - Passing paramter to JQM page</title>
<meta name="viewport" content="width=device-width,
initial-scale=1">
<link rel="stylesheet"
href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-
1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-
1.8.2.min.js"></script>
<script
src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-
1.2.0.min.js"></script>
<script src="purl.js"></script>
<script type="text/javascript">
$(document).bind("pageinit", function(){
$("#gotoBtn").click(function(){
var argValue = $("#argTxt").val();
$.mobile.changePage("page2.html",
{data:{arg1:argValue}});