Node.js + MySQL 实现数据的增删改查

栏目: Node.js · 发布时间: 7年前

views/form.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>todo crud - add todo</title>
  </head>
  <body>
    <form action="/edit" method="POST">
      <fieldset>
        <legend>add todo</legend>
        <input type="text" hidden name="id" value="{{ todo.id }}" />
        <div class="form-row">
          <label for="content">
            todo content: <input name="content" type="text" placeholder="todo content..." id="content" value="{{ todo.content }}"
            />
          </label>
        </div>
        <div class="form-row">
          <label for="is_done">
            is complete:
            <input
              name="is_done"
              type="checkbox"
              id="is_done"
              value="1"
              {%if not todo.is_done=='0'%}checked{%endif%}
            />
          </label>
        </div>
        <button type="submit">submit</button>
      </fieldset>
    </form>
  </body>
</html>

以上所述就是小编给大家介绍的《Node.js + MySQL 实现数据的增删改查》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

机器学习实战:基于Scikit-Learn和TensorFlow

机器学习实战:基于Scikit-Learn和TensorFlow

Aurélien Géron / 王静源、贾玮、边蕤、邱俊涛 / 机械工业出版社 / 2018-8 / 119.00

本书主要分为两个部分。第一部分为第1章到第8章,涵盖机器学习的基础理论知识和基本算法——从线性回归到随机森林等,帮助读者掌握Scikit-Learn的常用方法;第二部分为第9章到第16章,探讨深度学习和常用框架TensorFlow,一步一个脚印地带领读者使用TensorFlow搭建和训练深度神经网络,以及卷积神经网络。一起来看看 《机器学习实战:基于Scikit-Learn和TensorFlow》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具