Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/204.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android phonegap数据库连接_Android_Jquery_Html_Database_Cordova - Fatal编程技术网

android phonegap数据库连接

android phonegap数据库连接,android,jquery,html,database,cordova,Android,Jquery,Html,Database,Cordova,我想使用这个html并建立一个数据库连接来添加这些东西。但我真的不知道该用什么或怎么做。你能帮我吗 <html> <head> <title>Ingredient</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1">

我想使用这个html并建立一个数据库连接来添加这些东西。但我真的不知道该用什么或怎么做。你能帮我吗

    <html>
      <head>
    <title>Ingredient</title>
      <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="themes/receta.min.css" />
       <link rel="stylesheet" href="themes/receta.css" />
     <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
      <script src="js/recetas.js">  </script>  

</head>
<div>
<h1>RECETA</h1>
<label for="receta">Nombre Receta:</label><br>
<input type="text" name="receta" value="" maxlength="20" /><br>
</div>
<CENTER>
<body>

      <label>Instrucciones</label>
      <textarea style="width: 300px; height: 150px">

    </textarea>

     <label>Ingredientes</label>
     <ul style="width: 300px; height: 150px">
    <ul>

    </ul>

    <select onchange="selectIngredient(this);">
     <option value="Cheese">Cheese</option>
     <option value="Olives">Olives</option>
     <option value="Pepperoni">Pepperoni</option>
     <option value="Milk">Milk</option>
    </select>

<li style="width: 300px; height: 150px">
<button>GUARDAR</button>
<li><a href="consultas.html" data-transition="none" rel="external">CONSULTAR</a></li>
</body>
</center>
</html>
以下是我用来在html中列出的成分的功能:

function selectIngredient(select)
    { 
      var $ul = $(select).closest('.ui-select').prev('ul');
console.log($ul[0])
  if ($ul.find('input[value=' + $(select).val() + ']').length == 0) {
    console.log('s')
        $ul.append('<li onclick="$(this).remove();">' +
          '<input type="hidden" name="ingredients[]" value="' + 
          $(select).val() + '" /> ' +
          $(select).find('option:selected').text() + '</li>');
  }
    }
我可以把一个形象,但我需要更多的声誉,请帮助


您不想从应用程序建立直接数据库连接。如果您能够做到这一点,就有可能向全世界公开您的数据库连接凭据。当然,这是不可取的

您需要做的是在应用程序调用的地方放置一个web服务。然后,web服务将进行数据库交互