jQuery移动应用程序无法在使用PhoneGap创建的Android应用程序上运行

时间:2018-02-06 17:13:11

标签: android-layout jquery-mobile phonegap-build phonegap

我正在尝试使用Phonegap在Android上创建一个表单,但jQuery mobile不能使用它。如果我从PhoneGap服务器直接加载它是有效的。应用程序的UI只是纯HTML。我已经尝试过Stackoverflow上的所有解决方案,但我似乎无法弄清楚实际问题。

You can see the difference. When loading from PhoneGap server it works but not on android emulator.

<!DOCTYPE HTML>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">
    <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="cordova.js">
</head>
<body>
<div data-role="page" id="index">
    <fieldset><legend><h1>RentalZ</h1></legend>
    <div data-role="fieldcontain" class="ui-content">
        <form id="rentalzform">
        <label>Property Type: </label>
        <select name="propertyType">
            <option value="House">House</option>
            <option value="Flat">Flat</option>
            <option value="Bungalow">Bungalow</option>
        </select><br><br>
        <label>Bedroom: </label>
        <select name="bedrooms">
            <option value="Studio">Studio</option>
            <option value="One">One</option>
            <option value="Two">Two</option>
            <option value="Three">Three</option>
            <option value="Four">Four</option>
            <option value="Five">5</option>
        </select><br><br>
        <label>Date and Time: </label> <br><br>
        <label>Monthly Rent (£): </label>
        <input type="number" min="0" step="any" name="rent"><br><br>
        <label>Furniture Type: </label>
        <select name="furnitureType">
            <option value="-">-</option>
            <option value="Furnished">Furnished</option>
            <option value="PartlyFurnished">Partly Furnished</option>
            <option value="Unfurnished">Unfurnished</option>
        </select><br><br>
        <textarea rows="4" cols="30">Add Any Notes Here!</textarea><br><br>
        <label>Name: </label>
        <input type="text"  name="name" required><br><br>
        <button onclick="showConfirm()">Click Here!</button>
        </form>
    </div>
    </fieldset>
    </div>
</body>
</html>

0 个答案:

没有答案