jQuery mobile ——制作表单
jQuery mobile学习
3.请运用jQuery mobile功能,将以下关于问卷调查的表单(Form)页面完成,请注意网页版面的调整,使得手机画面能够工整与美观。请同学完成此网页内容与相应所需的java script。
涉及的知识
- jQuery mobile 的使用
- 表单 的制作
代码实现
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>3-用jQuery Mobile 写表单</title>
<link href="jquery.mobile-1.2.0.css" rel="stylesheet" />
<script src="jquery-1.7.1.min.js"></script>
<script src="jquery.mobile-1.2.0.js"></script>
<style type="text/css">
.label1_stytle {
font-weight: bold;
display: inline-block;
width: 100px;
margin-bottom: 15px;
margin-left: 15px;
margin-right:50px;
}
.p_background {
background: #a6a2a2;
font-weight: bold;
margin-left: 15px;
margin-right: 15px;
}
.label2_sytle {
font-weight: bold;
display: inline-block;
margin-bottom: 15px;
margin-left: 15px;
}
.input1_stytle {
background: #c7f3e7;
margin-bottom: 15px;
margin-left: 15px;
margin-right: 15px;
}
.div1_content {
border: solid #000000; /*设置边框样式跟颜色*/
border-width: 1px; /*设置边框宽度*/
width: 630px; /*设置div宽度*/
height: 350px; /*设置div高度*/
margin: 0 auto; /*设置div居中*/
}
.div2_content {
border: solid #000000; /*设置边框样式跟颜色*/
border-width: 1px; /*设置边框宽度*/
width: 630px; /*设置div宽度*/
margin-bottom: 15px;
height: 350px; /*设置div高度*/
margin: 0 auto; /*设置div居中*/
}
.p_stytle {
width: 630px; /*设置div宽度*/
margin: 0 auto; /*设置div居中*/
margin-bottom: 15px;
margin-top: 15px;
}
.div3_content {
border: solid #000000; /*设置边框样式跟颜色*/
border-width: 1px; /*设置边框宽度*/
width: 630px; /*设置div宽度*/
margin-bottom: 15px;
height: 200px; /*设置div高度*/
margin: 0 auto; /*设置div居中*/
}
.div4_content {
border: 0; /*设置边框样式跟颜色*/
border-width: 1px; /*设置边框宽