通过js传值
<!DOCTYPE html>
<html>
<head>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<link rel="stylesheet" href="_SYS_Inc/Jquery/jquery.mobile-1.3.2.min.css">
<script src="_SYS_Inc/Jquery/jquery-1.8.3.min.js"></script>
<script src="_SYS_Inc/Jquery/jquery.mobile-1.3.2.min.js"></script>
<style type="text/css">
.ui-bar {
text-align:center
}
</style>
</head>
<body>
<script type="text/javascript">
var xinghao="";
var sheng="";
var jiage="";
var shijian="";
var licheng="";
var pailiang="";
var bianshu="";
var peizhi="";
var shouxu="";
</script>
<div data-role="page" id="page">
<div data-role="header">
<h1>汽车价值实时估</h1>
</div>
<div data-role="content">
<p>填写只要3分钟哦~~~</p>
<h3>车辆型号:</h3>
<form method="post" action="">
<div data-role="fieldcontain">
<label for="fullname" class="ui-hidden-accessible">车辆型号:</label>
<input type="text" name="fname" id="fname" placeholder="如:奔驰600L" >
</div>
</form>
</div>
<div data-role="footer" data-position="fixed" class="ui-bar">
<div data-role="controlgroup" data-type="horizontal">
<a href="#" data-role="button" data-icon="arrow-l" >上一步</a>
<a href="#" data-role="button" data-icon="info">重填</a>
<a href="#page2" data-role="button" data-icon="arrow-r" onClick="xinghao=document.getElementById('fname').value;">下一步</a>
</div>
</div>
</div>
<div data-role="page" id="page2">
<div data-role="header">
<h1>汽车价值实时估</h1>
</div>
<div data-role="content">
<script>
$(document).bind('pagebeforechange',function(e,data,options){
if (typeof data.toPage !== "string"){
return;
}
aaaa="<form method=\"post\" action=\"demoform.asp\"> <div data-role=\"fieldcontain\"> <label for=\"fullname\" class=\"ui-hidden-accessible\">车辆型号:</label> <input type=\"text\" name=\"fname\" id=\"fname\" placeholder=\"如:奔驰600L\" > </div></form>";
page2_body.innerHTML=aaaa;
$('#page2_body').listview('refresh');
});
</script>
<p id="page2_body">在此处插入正文</p>
</div>
<div data-role="footer" data-position="fixed" class="ui-bar">
<div data-role="controlgroup" data-type="horizontal">
<a href="#page" data-role="button" data-icon="plus">上一步</a>
<a href="#" data-role="button" data-icon="plus">重填</a>
<a href="#" data-role="button" data-icon="plus">下一步</a>
</div>
</div>
</div>
</body>
</html>
浙公网安备 33010602011771号