复选框

Python自学第十四周(1)

老子叫甜甜 提交于 2019-11-27 10:46:03
Day14 首先了解一下socket与浏览器 1 #Author: Zachary 2 import socket 3 4 def handle_request(client): 5 buf = client.recv(1024) 6 client.send(bytes("HTTP/1.1 200 OK\r\n\r\n",encoding = "utf-8")) 7 client.send(bytes("Hello, Seven",encoding = "utf-8")) 8 9 def main(): 10 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 11 sock.bind(('localhost', 8000)) 12 sock.listen(5) 13 while True: 14 connection, address = sock.accept() 15 handle_request(connection) 16 connection.close() 17 18 if __name__ == '__main__': 19 main() 运行之后,在浏览器中输入localhost:8000 返回以下页面 HTML入门 编写Html文件 -doctype对应关系 -html标签,标签内部可以写属性

单选框 改成 复选框 的css样式

天涯浪子 提交于 2019-11-27 04:44:43
/* add for the global title checkbox fake */ .fake-checkbox { display: inline-block; vertical-align: middle; white-space: nowrap; cursor: pointer; line-height: 1; position: relative; .ivu-radio-wrapper { padding-left: 0.1rem; margin-bottom: 0.05rem; vertical-align: middle; .ivu-radio { display: inline-block; vertical-align: middle; white-space: nowrap; cursor: pointer; line-height: 1; position: relative; .ivu-radio-inner { display: inline-block; width: 14px; height: 14px; position: relative; top: 0; left: 0; border: 1px solid #dcdee2; border-radius: 2px; background-color: #fff; transition:

html中的checkbox复选框不确定状态的设置

元气小坏坏 提交于 2019-11-27 02:33:21
这篇文章要分享的是复选框的不确定状态,html中的复选框是: <input id="cb" type="checkbox"/> 一般遇到复选框或许只需要选中或者不选中两种状态即可,但是有时候需要第三种不确定状态,例如做带复选框的级联菜单时,子级菜单的多个复选框为部分选中的时,父级菜单的复选框应处于不确定状态,来反映子菜单的部分选中情况。 方法是通过js设置复选框的indeterminate属性,在标签中设置此属性无效。 <html> <head> <script> function init(){ chkbox = document.getElementById("cb"); } function fun1 () { chkbox.indeterminate = false; chkbox.checked = true; } function fun2() { chkbox.indeterminate = false; chkbox.checked = false; } function fun3() { chkbox.indeterminate = true; } </script> </head> <body οnlοad="init()"> <input id="cb" type="checkbox" /> <button οnclick="fun1()">选中<

Html5 Checkbox多种状态切换

喜你入骨 提交于 2019-11-27 02:32:13
最近在搞一个权限配置的页面,里面的选项框要实现级联,同时checkbox需要有三种状态:选择,部分选择,不选,搜索找到一篇文章jQuery 版的 CheckBox 复选框成组联动(性能改进版)不过我在浏览器上测试有问题,进行修改代码如下: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script> </head> <body> <div class="container"> <input type="checkbox" forcheckboxgroup="group_sel"/>全选 <input type="checkbox" group="group_sel"/>选项1 <input type="checkbox" group="group_sel"/>选项2 <input type="checkbox" group="group_sel"/>选项n <button type="button" forcheckboxgroup="group_sel">对选中的项目进行操作</button> </div> <script type="text/javascript"> $("#ww")

JavaScript 之jQuery(二)

一世执手 提交于 2019-11-26 22:38:22
四. 操作元素 与 文档处理 ( 属性,css ) --------------------------属性 $("").attr(); $("").removeAttr(); $("").prop(); $("").removeProp(); --------------------------CSS类 $("").addClass(class|fn) $("").removeClass([class|fn]) --------------------------HTML代码/文本/值 $("").html([val|fn]) $("").text([val|fn]) $("").val([val|fn|arr]) --------------------------- $("").css("color","red") 1.操作元素 (1) attr() 设置属性值或者 返回被选元素的属性值 例: <div class="q" id="div01" box="box1"> </div> <script src="jquery-3.4.1.min.js"></script> <script> //获取值:attr()设置一个属性值的时候 只是获取值 var id = $('div').attr('id'); console.log(id); var cla = $('div')

BootstrapTable checkbox默认选中

♀尐吖头ヾ 提交于 2019-11-26 19:34:33
BootstrapTable 在Web后台管理项目中对表格展示数据使用居多,主要是表格的多条件查询、分页、排序等功能。我们的项目中前端框架是Bootstrap。所以很多插件都是支持Bootstrap的。bootstrap-table是一款非常有名的开源表格插件。我们在项目中的表格就是使用它进行展示。 问题描述 在修改页面需要将之前选中的项在复选框默认选中。其实挺简单。主要是自己是后端编程,对前端了解不深。虽然有详细的文档但是也容易迷糊。 <!-- input中存放的是后台返回的‘护理项目’选中值,stirng类型 1,2,3 --> <input type="hidden" name="nursingUuids" value="${oldPeopleNursing.nursingUuids}"> <!-- bootstrap table --> <table id="table-beadhouseNursing" class="table table-striped table-condensed" data-url="beadhouseNursing/search" data-query-params="beadhouseNursingQueryParams"> <thead> <tr> <th data-checkbox="true"></th> <th data-field=

HTML(9)表单

落花浮王杯 提交于 2019-11-26 18:01:52
一、表单   1.表单的作用   HTML 表单用于接收不同类型的用户输入,用户提交表单时向服务器传输数据,从而实现用户与Web服务器的交互。   2.表单的工作机制           3.表单定义(<form></form>标签)    HTML表单是一个包含表单元素的区域, 表单使用<form> 标签创建。表单能够包含 input 元素 ,比如文本字段、复选框、单选框、提交按钮等等。表单还可以包含 menus 、 textarea 、 fieldset 、 legend 和 label 元素 。注意,<form >元素是块级元素,其前后会产生折行。 1 <form action="reg.ashx" method="post"> 2 <!--表单元素在这里--> 3 </form>   3.表单属性    action:规定当提交表单时,向何处发送表单数据。action取值为:第一,一个URL(绝对URL/相对URL),一般指向服务器端一个程序,程序接收到表单提交过来的数据(即表单元素值)作相应处理。比如<form action="http://www.cnblogs.com/reg.ashx">,当用户提交这个表单时,服务器将执行网址"http://www.cnblogs.com/"上的名为"reg.ashx"的一般处理程序。第二,使用mailto协议的URL地址

关于复选框带条件去设置选不中的问题

爷,独闯天下 提交于 2019-11-26 16:47:10
关于js复选框带条件去设置选不中的问题: 我在做的条件:多选的框是icheckbox_square-blue,假设“调息启动”这个字段值为“是”,也就是adjrtbegin=‘1’,那么它前面的□就不会显示出来: 接下来我的js代码是这样:这个达到的效果就是,当我点击最上面的那个全选框,调息启动那个字段为是的就无法选中,我如果要进行删除操作的话,只能删除调息启动为否的数据。但是出现的问题就是,我不点最上面那个全选框,我直接去选择一条调息启动字段为是的数据就能选中进行删除操作。 let list = $('.tbscrollbar').find('tbody').find('tr'); let result = list.filter((i,item) => { if($(item).find('td[name=adjrtbegin]').text()== '1'){ $(item).find('td').eq(0).find('div').removeClass('checked'); $(item).find('td').eq(0).find(".icheckbox_square-blue").css("display","none"); $(item).find('td').css("background-color","#ffffff"); /*这个是最上面的全选框,点击以后

解决复选框、单选框与文字不能对齐的问题

怎甘沉沦 提交于 2019-11-26 16:46:48
<input type="checkbox"/><label>复选框</label> <input type="radio"/><label>单选框</label> label { font-size: 12px; } /*Method 1:*/ input { vertical-align: text-bottom; margin-bottom: 2px; } /*Method 2*/ input { vertical-align: middle; margin-top: -2px; margin-bottom: 0px; } 来源: https://blog.csdn.net/qq_38370731/article/details/98957538

实现复选框的全选和反选

你。 提交于 2019-11-26 15:53:34
新手入坑博客第一天 废话不多说,先上代码      <!--与下面代码进行对比--> 1<input type="checkbox" value=""/> 2<input type="checkbox" value=""/> 3<input type="checkbox" value=""/> 4<input type="checkbox" value=""/> <!--有全选/反选功能--> <div id="test"> 0<input type="checkbox" onclick="clickDome(this);"/> 1<input type="checkbox" value=""/> 2<input type="checkbox" value=""/> 3<input type="checkbox" value=""/> 4<input type="checkbox" value=""/> </div> <script> /*注意要记得导入jquery.js包*/ function clickDome(obj){ if($(obj).prop("checked")){ $("#test").find("input[type='checkbox']").prop("checked",true); }else{ $("#test").find("input[type=