• <small id='r5mP5'></small><noframes id='r5mP5'>

      <bdo id='r5mP5'></bdo><ul id='r5mP5'></ul>

    <tfoot id='r5mP5'></tfoot>
    <legend id='r5mP5'><style id='r5mP5'><dir id='r5mP5'><q id='r5mP5'></q></dir></style></legend>

        <i id='r5mP5'><tr id='r5mP5'><dt id='r5mP5'><q id='r5mP5'><span id='r5mP5'><b id='r5mP5'><form id='r5mP5'><ins id='r5mP5'></ins><ul id='r5mP5'></ul><sub id='r5mP5'></sub></form><legend id='r5mP5'></legend><bdo id='r5mP5'><pre id='r5mP5'><center id='r5mP5'></center></pre></bdo></b><th id='r5mP5'></th></span></q></dt></tr></i><div id='r5mP5'><tfoot id='r5mP5'></tfoot><dl id='r5mP5'><fieldset id='r5mP5'></fieldset></dl></div>

        使用 onclick 按钮更新数据库信息

        Update database info with onclick button(使用 onclick 按钮更新数据库信息)
          <bdo id='qYnIY'></bdo><ul id='qYnIY'></ul>

          • <tfoot id='qYnIY'></tfoot>

              <small id='qYnIY'></small><noframes id='qYnIY'>

              <legend id='qYnIY'><style id='qYnIY'><dir id='qYnIY'><q id='qYnIY'></q></dir></style></legend>

                  <tbody id='qYnIY'></tbody>
                • <i id='qYnIY'><tr id='qYnIY'><dt id='qYnIY'><q id='qYnIY'><span id='qYnIY'><b id='qYnIY'><form id='qYnIY'><ins id='qYnIY'></ins><ul id='qYnIY'></ul><sub id='qYnIY'></sub></form><legend id='qYnIY'></legend><bdo id='qYnIY'><pre id='qYnIY'><center id='qYnIY'></center></pre></bdo></b><th id='qYnIY'></th></span></q></dt></tr></i><div id='qYnIY'><tfoot id='qYnIY'></tfoot><dl id='qYnIY'><fieldset id='qYnIY'></fieldset></dl></div>

                • 本文介绍了使用 onclick 按钮更新数据库信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要一些关于按钮 onClick 的帮助.

                  I need some help with a button onClick.

                  <button type="button" id="1" onclick="this.disabled=true; ^FUNCTION TO UPDATE^"> 
                  <button type="button" id="2" onclick="this.disabled=true; ^FUNCTION TO UPDATE^"> 
                  <button type="button" id="3" onclick="this.disabled=true; ^FUNCTION TO UPDATE^"> 
                  

                  使用此代码,我禁用了按下的按钮,但我还需要更新发送 id 的数据库中的信息,如下所示:

                  With this code I disable the button that was pressed, but I also need to update info in a database sending the id, something like this:

                  UPDATE reservation SET status='approved' WHERE id=^ID OF THE CLICKED BUTTON^
                  

                  我需要将其加载到同一页面中,而无需使用 POSTGET 发送它.

                  I need it to be loaded in the same page without sending it with POST or GET.

                  推荐答案

                  为此使用 ajax 调用例如:

                  Use ajax call for this eg:

                  $.get('update_reservation.php', {id: 1});
                  

                  请参阅 http://api.jquery.com/jQuery.get/ 了解更多信息信息.

                  see http://api.jquery.com/jQuery.get/ for more info.

                  这篇关于使用 onclick 按钮更新数据库信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  PHP Upload File Validation(PHP 上传文件验证)
                  PHP Error - Uploading a file(PHP 错误 - 上传文件)
                  How can I write tests for file upload in PHP?(如何在 PHP 中编写文件上传测试?)
                  php resizing image on upload rotates the image when i don#39;t want it to(php在上传时调整图像大小会在我不想要它时旋转图像)
                  How to send additional data using PLupload?(如何使用 PLupload 发送附加数据?)
                  change button text in js/ajax after mp4 =gt;mp3 conversion in php(在 php 中的 mp4 =gt;mp3 转换后更改 js/ajax 中的按钮文本)
                • <tfoot id='66Icy'></tfoot>

                      <tbody id='66Icy'></tbody>

                      <i id='66Icy'><tr id='66Icy'><dt id='66Icy'><q id='66Icy'><span id='66Icy'><b id='66Icy'><form id='66Icy'><ins id='66Icy'></ins><ul id='66Icy'></ul><sub id='66Icy'></sub></form><legend id='66Icy'></legend><bdo id='66Icy'><pre id='66Icy'><center id='66Icy'></center></pre></bdo></b><th id='66Icy'></th></span></q></dt></tr></i><div id='66Icy'><tfoot id='66Icy'></tfoot><dl id='66Icy'><fieldset id='66Icy'></fieldset></dl></div>

                        • <small id='66Icy'></small><noframes id='66Icy'>

                        • <legend id='66Icy'><style id='66Icy'><dir id='66Icy'><q id='66Icy'></q></dir></style></legend>
                            <bdo id='66Icy'></bdo><ul id='66Icy'></ul>