在所有浏览器中以jquery mobile显示全宽和高度?

时间:2013-06-10 10:10:16

标签: jquery css jquery-mobile

这是我的代码

<!DOCTYPE html> 
    <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>
function loginProcess()
{
    $.ajax({
        type: 'GET',
        url: 'loginProcess.php',
        data:
        {
            uname:$("#userName").val(),
            pass:$("#pass").val(),
            rem:$("#remVal").val()
        },
        cache: false,
        success: function(data)
        {
            if(data == 1)
            {
                location.href="home.php";
            }
            else
            {
                location.href="index.php";
            }
        }
        });
}
function ckLogin(e)
{
    if(e.keyCode == 13)
    {
        loginProcess();
    }
}

                                            

      <li>
            <font size="1px"> Username: </font>
            <input type="text" id="userName" name="userName" value="kamalesh" onKeyUp="ckLogin(event);" required="required" />
      </li>

      <li>
          <font size="1px"> Password: </font>
          <input type="password" id="pass" name="pass" value="kamalesh" onKeyUp="ckLogin(event);" required="required" />
      </li>

      <li>
            <span><font size="1px"> Remember me: </font></span>
            <select data-role=slider id="remVal">

              <option value=no> No </option>

              <option value=yes> Yes </option>

            </select>
      </li>

      <li><input type="button" value="LogIn" onClick="loginProcess();"/></li>
    </ul>
    </form>
</div>
</div>
</body>

</html>

http://jsfiddle.net/DeJzZ/210/

1 个答案:

答案 0 :(得分:2)

在头标记

中使用此代码段
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">