HTML之form表单和input系列
<form method="POST" action="/host">
<input class="c1" type="text" name="id" placeholder="主机ID" />
<input type="text" name="hostname" placeholder="主机名" />
<input type="text" name="hostip" placeholder="主机IP" />
<input type="text" name="password" placeholder="密码" />
<select name="group_id">
{% for row in group_list %}
<option value={{row.id}}>{{ row.caption }}</option>
{% endfor %}
</select> <input type="submit" value="添加"/>
</form>
表格
<table border="">
<tr style="background-color: aquamarine">
<th class="c1">ID</th>
<th>主机名</th>
<th>主机IP</th>
<th>主机密码</th>
<th>业务部门</th>
<th>操作</th>
<th>操作</th>
</tr>
{% for row in host_list %}
<tr>
<td class="c1">{{ row.id }}</td>
<td>{{ row.servername }}</td>
<td>{{ row.serverip }}</td>
<td>{{ row.serverpassword }}</td>
<td>{{ row.server_group.caption }}</td>
<td>编辑</td>
<td class="i1">删除</td>
</tr>
{% endfor %}
</table>
model 查询操作
models.HostInfo.objects.filter(id=4 or id __gt=4 or id__lt=4 or id__gte=4)
HTML之form表单和input系列的更多相关文章
- ajax form表单提交 input file中的文件
ajax form表单提交 input file中的文件 现今的主流浏览器由于ajax提交form表单无法把文件类型数据提交到后台,供后台处理,可是开发中由于某些原因又不得不用ajax提交文件, 为了 ...
- input file 在开发中遇到的问题 类似ajax form表单提交 input file中的文件
最近在做项目的过程中遇到个问题,在这里做个记录防止日后忘记 现今的主流浏览器由于ajax提交form表单无法把文件类型数据提交到后台,供后台处理,可是开发中由于某些原因又不得不用ajax提交文件, 为 ...
- 前端 HTML form表单标签 input标签 type属性 file 上传文件
加上上传文件功能 input type='file' - 依赖form表单里一个属性 enctype="multipart/form-data" 加上这个属性表示把你上次文件一点 ...
- 判断form表单每个input字段是否有内容
//---------------------------------------------------input失去焦点时判断是否有值 btn_click: function () { //inp ...
- html基础 表单标签 input系列 以及优化方法
场景:在网页中显示手机用户信息的表单效果. 如:登录页.注册页标签名:input 用法是通过改变type属性值,来展示不同效果 1.1 html 代码 <!--placeholder 提示符又叫 ...
- form表单 一个input时 回车自动提交
问题描述 form表单中,如果当前表单只有一个input输入框时,单击回车会自动提交当前表单. 解决方案 在当前form表单中添加一个隐藏的input, <input style="d ...
- 常用6种type的form表单的input标签分析及示例
<input> 标签用于搜集用户信息. 根据不同的 type 属性值,输入字段拥有很多种形式.输入字段可以是文本字段.复选框.掩码后的文本控件.单选按钮.按钮等等. 在这里博主介绍6中ty ...
- 前端 HTML form表单标签 input标签 type属性 radio 单选框
<input type="radio"> 单选框 适用于 选择性别按钮网页等 <!DOCTYPE html> <html lang="en& ...
- 前端 HTML form表单标签 input标签 type属性 重置按钮 reset
input type="reset" value="重置" reset重置 还原到默认状态 <!DOCTYPE html> <html lan ...
随机推荐
- ToolsCodeTemplate使用
最近学习使用CodeSmith代码生成器 CodeSmith 是一种语法类似于asp.net的基于模板的代码生成器,程序可以自定义模板,从而减少重复编码的劳动量,提高效率. 作用:CodeSmith ...
- 【转】ZigBee终端入网方式深入分析
前述 继之前对终端Direct Join的分析,发现很多东西还很模糊,存在很多问题.终于找到时间继续深入挖下去,这次应该比较完整地搞清了终端的入网机制,并纠正之前的几个认识偏差. 由于Z-Stack网 ...
- 严重: Exception sending context initialized event to listener instance of class
问题描述:Exception sending context initialized event to listener instance of class org.springframework.w ...
- Python 操作 MS Excel 文件
利用 Python 对 Excel 文件进行操作需要使用第三方库: openpyxl,可执行 pip install openpyxl 进行安装 1. 导入 openpyxl 模块 导入 openpy ...
- SQLServer2005+获取表结构信息
SELECT d.name TableName, a.colorder FieldNo,a.name FieldName, (case when COLUMNPROPERTY( a.id,a.name ...
- MSSQL远程连接
背景:部署公司自己研发的ERP系统. 1)系统架构: .NET+MSSQL. 2)服务器系统:Windows Server 2008 R2 Enterprise 3)数据库:MSSQL Server ...
- canvas 制作flappy bird(像素小鸟)全流程
flappy bird制作全流程: 一.前言 像素小鸟这个简单的游戏于2014年在网络上爆红,游戏上线一段时间内appleStore上的下载量一度达到5000万次,风靡一时, 近年来移动web的普及为 ...
- 在View and Data API中更改指定元素的颜色
大家在使用View and Data API开发过程中,经常会用到的就是改变某些元素的颜色已区别显示.比如根据某些属性做不同颜色的专题显示,或者用不同颜色表示施工进度,或者只是简单的以颜色变化来提醒用 ...
- 使用PullToRefresh插件实现ListView下拉刷新(Android Studio)
下载PullToRefresh
- 在Asp.net MVC 3 web应用程序中,我们会用到ViewData与ViewBag,对比一下:
Asp.net MVC中的ViewData与ViewBag ViewData ViewBag 它是Key/Value字典集合 它是dynamic类型对像 从Asp.net MVC 1 就有了 ASP. ...