实例 jQuery Mobile 主题化表单

x
 
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">
<script src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="https://libs.baidu.com/jquerymobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
</head>
<body>
<div data-role="page" id="pageone">
  <div data-role="header">
  <h1>主题化表单</h1>
  </div>
  <div data-role="content" data-theme="e">
  <form method="post" action="/example/html/html_form.aspx">
  <div data-role="fieldcontain">
    <label for="name">全名:</label>
    <input type="text" name="text" id="name" placeholder="您的姓名..." data-theme="a">
    <br><br>
  
    <label for="search">您需要搜索什么?</label>
    <input type="search" name="search" id="search" placeholder="需要搜索的内容..." data-theme="d">
    <br><br>
    <label for="date">今天的日期:</label>
    <input type="date" name="date" id="date">
    <br><br>
 
    <label for="colors">请选择喜爱的颜色:</label>
    <select id="colors" name="colors" data-theme="b">
      <option value="red">红色
      <option value="green">绿色
      <option value="blue">蓝色
    </select>
    <br><br>
 
    <label for="switch">切换开关:</label>
    <select name="switch" id="switch" data-role="slider" data-theme="a">
      <option value="on">On
      <option value="off">Off
    </select>

输出结果