按钮

vue项目爬坑笔记(一)

烈酒焚心 提交于 2020-01-26 23:08:45
1.作为一个后台管理系统, 采用vue2.0+ vuex+iview+vue-router+webpack 需要清楚各个文件的意义,譬如存储,登录,请求封装.....项目框架搭建就是这样! 2.记录下爬出来的坑,万一哪一天你也不小心掉进去了一点就跳出来了,o(╥﹏╥)o 1.iview 组件upload : 请求头的加入 传递参数data的格式 action动态路径 <Upload multiple :show-upload-list="false" :headers="{'token':user}" :data="modelType" :before-upload="handleBeforeUpload" :on-success="handleSuccess" :action="UploadUrl()"> <Button type="ghost" icon="ios-cloud-upload-outline">文件上传</Button> </Upload> 2.iview 组件 table 中添加操作, 需要注意 img. a标签需要用domProps 都是很基础的iview问题,但是iview文档说明比较简单,所以留个记录!!后面再接着写.... 来源: https://www.cnblogs.com/jasonwn/p/8252520.html

Android基础——使用Bundle在Activity间传递数据

倾然丶 夕夏残阳落幕 提交于 2020-01-26 22:23:09
Bundle是个保存元组<key,value>的数据结构,两个活动传递数据时就通过Bundle进行传递 在Main中输入数据,然后将数据传递给Address 两个活动布局 Main <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".MainActivity"> <EditText android:id="@+id/name" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="请输入姓名" /> <EditText android:id="@+id

如何捕捉窗口的前进、后退、刷新、停止、关闭、移动事件

删除回忆录丶 提交于 2020-01-26 21:50:08
停止有document.onstop,看微软的例子 <body scroll=no> <script> document.onstop=fnTrapStop; var oInterval; window.onload=fnInit; function fnInit(){ oInterval=window.setInterval("fnCycle()",1); } function fnCycle(){ // Do something } function fnTrapStop(){ window.clearInterval(oInterval); alert(); } </script> </body> ___________________________________________________________________________________________ 刷新与关闭 <body scroll=no> <script> document.body.onbeforeunload=aa; function aa(){ if(event.clientY<0&&event.clientX>760||event.altKey) alert("窗口关闭!") else alert("窗口刷新!") } </script> </body> //写死了宽度

JQ——遍历(each遍历、数组遍历)、添加(append、appendTo)

 ̄綄美尐妖づ 提交于 2020-01-26 20:56:53
1、each实现遍历操作: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>each实现的遍历</title> <script type="text/javascript" src="../js/jquery-1.8.3.js" ></script> <script> $(function(){ $("button").click(function(){ $("li").each(function(){ alert($(this).text()) }); }); }); </script> </head> <body> <button>点击按键,each实现遍历操作</button> <ul> <li>2020</li> <li>新年好!</li> <li>武汉加油!</li> </ul> </body> </html> 2、遍历数组: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>数组遍历</title> <script type="text/javascript" src="../js/jquery-1.8.3.js" ></script> <script> $(function () { $.each([213,37,34,567

jQuery-select

瘦欲@ 提交于 2020-01-26 16:47:10
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < html xmlns ="http://www.w3.org/1999/xhtml" > < head > < title > jQuery-Select-Test </ title > < script src ="http://media.pec365.com/rainnoless/javascript/jquery-1.3.2.min.js" type ="text/javascript" ></ script > < style type ="text/css" > .div { width : 95% ; margin-left : 15px ; margin-top : 15px ; margin-right : 15px ; padding-left : 5px ; padding-top : 5px ; padding-bottom : 5px ; background-color : #ccc ; border : #999 1px solid ; line-height : 30px ; font-size :

jquery对象中 “冒号” 详解

怎甘沉沦 提交于 2020-01-26 16:27:03
冒号 可以理解为 “匹配” 或 “选取”的意思。 $(":button") 表示匹配所有的按钮。 $("input:checked")表示匹配所有选中的被选中元素(复选框、单选框等,不包括select中的option)。 $("div.container")中的'.'号表示class, $("div #msg")中的'#'表示id。那么$(":button") 中的':'表示类型(type),如$(":button") 表示类型为button的控件,$("input:checked")表示所有类型为选中的复选框元素。 ================================================================================================================= :在css中代表伪选择符,但是在jQuery里(因为jQuery里的选择器很多地方都使用css中的表示方法),这里就是固定用法,还有如下表单控件:具体的你搜一下就有很多说明。 :input :text :password :radio :checkbox -->选取所有带有 type="checkbox" 的 <input> 元素。 :checked -->选取所有被选中的checkbox 的值。 :submit :image :reset

jquery中:input和input的区别

≯℡__Kan透↙ 提交于 2020-01-26 16:26:25
:input表示选择表单中的input,select,textarea,button元素, input仅仅选择input元素。 <button>和<input type="button"> 的区别 定义和用法 <button> 标签定义一个按钮。 在 button 元素内部,您可以放置内容,比如文本或图像。这是该元素与使用 input 元素创建的按钮之间的不同之处。 <button> 控件 与 <input type="button"> 相比,提供了更为强大的功能和更丰富的内容。 <button> 与 </button> 标签之间的所有内容都是按钮的内容,其中包括任何可接受的正文内容,比如文本或多媒体内容。例如,我们可以在按钮中包括一个图像和相关的文本,用它们在按钮中创建一个吸引人的标记图像。 唯一禁止使用的元素是图像映射,因为它对鼠标和键盘敏感的动作会干扰表单按钮的行为。 请始终为按钮规定 type 属性。 Internet Explorer 的默认类型是 "button",而其他浏览器中(包括 W3C 规范)的默认值是 "submit"。 来源: https://www.cnblogs.com/theWayToAce/p/5495088.html

jQuery基本语法

删除回忆录丶 提交于 2020-01-26 15:59:08
为什么要用jQuery? 写起来简单,省事,开发效率高,兼容性好(write less,do more). 什么事jQuery? jQuery是一个兼容多浏览器的JavaScript库(类似python里面的模块), 如何使用jQuery? 导入: <script src="jquery-3.2.1.js"></script>     <script src="jquery-3.2.1.min.js"></script> 语法规则:$("") JS和jQuery的区别? jQuery就是用JS写的 js是基础,jQuery是工具 选择器 基本选择器   ID选择器  $("#id的值")   类选择器(class) $(".class的值")   标签选择器(html标签) $("标签的名字")   所有标签    $("*")   组合选择器  $("xx,xxx") 层级选择器 $("x y");// x的所有后代y(子子孙孙) $("x > y");// x的所有儿子y(儿子) $("x + y")// 找到所有紧挨在x后面的y $("x ~ y")// x之后所有的兄弟y  jQuery对象   用jQuery选择器查出来的就是jQuery对象   jQuery对象,他就可以使用jQuery方法,不能使用DOM的方法   DOM对象和jQuery对象的转换:     --

JQuery选择器

限于喜欢 提交于 2020-01-26 15:58:44
JQuery选择器 1.基本选择器 和CSS的定义差不多: 标签选择器 id选择器(#) 类选择器(点) 并集选择器(逗号) <head> <meta charset="UTF-8"> <title>选择器·基本选择器</title> <script src="js/jquery-3.3.1.min.js"></script> <script> $(function() { //id选择 $("#divOne").css("color", "red"); //标签选择 $("span").css("color", "green"); //class选择 $(".clsTwo").css("color", "blue"); //合并选取 $("#divOne,span,.clsTwo").css("fontSize", "50px"); }); </script> </head> <body> <div id="divOne">有ID的div</div> <span>span</span> <div class="clsTwo">有class的div</div> </body> <head> <meta charset="UTF-8"> <title>并集选择器:3 Click in 1</title> <script type="text/javascript" src="js

linux poll机制使用(一)

廉价感情. 提交于 2020-01-26 14:22:47
一、poll机制的作用 1.poll机制的作用 在前面的使用中断的的方式来读取按键值( linux 中断管理(四) )。使用这种方式读取按键,如果按键没有按下的时候,应用程序会一直处于睡眠的状态。如果想要即使按键没有按下,在一定的时间后也能返回,要实现这种功能,可以使用 poll机制 。( select IO复用 和 epoll 也可以实现这种功能,这里只写poll机制) 二、poll机制的应用编程 1.应用层函数接口 1).API: int poll(struct pollfd *fds, nfds_t nfds, int timeout); 2).Paramet: fds nfds timeout 参数类型: struct pollfd { int fd; /* 文件描述符 / short events; / 等待的发生事件类型 / short revents; / 实际返回的事件类型 */ }; 参数描述: fds是一个结构体指针,也就是poll函数可以同时等待一个或者多个文件描述符的事件 参数类型: nfds_t,其实就是int型 参数描述: 用来说明poll同时监听fds的个数 参数类型: int 参数描述: 等于-1:永久等待 等于0:立即返回 大于0:等待超时时间,以毫秒为单位 3).Return: 返回值 描述 <0 错误返回 =0 超时返回 >0 返回结构体中