js auto hover button & html5 button autofocus

input

// html 5

<input name="myinput" value="whatever" autofocus />

// auto focus

// <input type="text" id="mytext"/>

function setFocusToTextBox(){
document.getElementById("mytext").focus();
}

https://stackoverflow.com/questions/17500704/javascript-set-focus-to-html-form-element

HTML5 & autofoucs

https://www.w3schools.com/jsref/prop_pushbutton_autofocus.asp

https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_pushbutton_autofocus

button ??? OK



<button id="myBtn" autofocus>My Button</button>

// <button onclick="myFunction()">Try it</button>

// <p id="demo"></p>

function myFunction() {
var x = document.getElementById("myBtn").autofocus;
document.getElementById("demo").innerHTML = x;
}

auto css hover in js

opacity & transparent


.hui-btn-dashed-hover {
text-decoration: none;
color: #0072f5;
background-color: #fff;
border-color: #0072f5;
opacity: 0.7;
}
.hui-btn-dashed-hover:hover {
opacity: 1.0;
}

js set button hover

手动添加,hover 样式,then hover chage transparent


/* .h-btn:not([disabled]):hover {
text-decoration: none;
}
.h-btn-dashed:hover {
text-decoration: none;
color: #0072f5;
background-color: #fff;
border-color: #0072f5;
} */
.hui-btn-dashed-hover {
text-decoration: none;
color: #0072f5;
background-color: #fff;
border-color: #0072f5;
/* transparent: */
}

js auto hover button & html5 button autofocus的更多相关文章

  1. [js高手之路] html5 canvas系列教程 - 状态详解(save与restore)

    本文内容与路径([js高手之路] html5 canvas系列教程 - 开始路径beginPath与关闭路径closePath详解)是canvas中比较重要的概念.掌握理解他们是做出复杂canvas动 ...

  2. scrollTo & js auto scroll & scrollX & scrollY

    scrollTo & js auto scroll & scrollX & scrollY scrollX & scrollY 获取 scroll top height ...

  3. input[type="button"]与<button>的区别

    <button>标签  浏览器支持  所有主流浏览器都支持<button>标签.  重要事项:如果在HTML表单中使用button元素,不同的浏览器会提交不同的值.IE将提交& ...

  4. java编程接口(5) ------ button和button组

    这篇文章是由自己的学习笔记,欢迎转载,但请注明出处:http://blog.csdn.net/jesson20121020 了解了布局管理器和Swing事件模型,那么剩下的就是Swing 的各个组件了 ...

  5. [js高手之路] html5 canvas系列教程 - 掌握画直线图形的常用API

    我们接着上文[js高手之路] html5 canvase系列教程 - 认识canvas以及基本使用方法继续. 一.直线的绘制 cxt.moveTo( x1, y1 ): 将画笔移动到x1, y1这个点 ...

  6. [js高手之路] html5 canvas系列教程 - arcTo(弧度与二次,三次贝塞尔曲线以及在线工具)

    之前,我写了一个arc函数的用法:[js高手之路] html5 canvas系列教程 - arc绘制曲线图形(曲线,弧线,圆形). arcTo: cxt.arcTo( cx, cy, x2, y2, ...

  7. [js高手之路] html5 canvas系列教程 - arc绘制曲线图形(曲线,弧线,圆形)

    绘制曲线,经常会用到路径的知识,如果你对路径有疑问,可以参考我的这篇文章[js高手之路] html5 canvas系列教程 - 开始路径beginPath与关闭路径closePath详解. arc:画 ...

  8. [js高手之路] html5 canvas系列教程 - 图片操作(drawImage,clip,createPattern)

    接着上文[js高手之路] html5 canvas系列教程 - 文本样式(strokeText,fillText,measureText,textAlign,textBaseline)继续,本文介绍的 ...

  9. [js高手之路] html5 canvas系列教程 - 文本样式(strokeText,fillText,measureText,textAlign,textBaseline)

    接着上文线条样式[js高手之路] html5 canvas系列教程 - 线条样式(lineWidth,lineCap,lineJoin,setLineDash)继续. canvas提供两种输出文本的方 ...

随机推荐

  1. php 依赖注入的实现

    当A类需要依赖于B类,也就是说需要在A类中实例化B类的对象来使用时候,如果B类中的功能发生改变,也会导致A类中使用B类的地方也要跟着修改,导致A类与B类高耦合.这个时候解决方式是,A类应该去依赖B类的 ...

  2. 005_解决pip国外安装源慢的问题

    用默认的pip安装源pypi.python.org由于在国外经常会出现超时的问题,而且安装速度极其的慢,如下图中的超时问题=>

  3. GitHub 优秀的 Android 开源项目 (精品)

    1原文地址为 http://www.trinea.cn/android/android-open-source-projects-view/,作者Trinea Android开源项目系列汇总已完成,包 ...

  4. solidity learning (1)

    学习文档笔记:http://solidity-cn.readthedocs.io/zh/develop/layout-of-source-files.html 1.pragma solidity ^0 ...

  5. p1313计算系数题解

    #include<algorithm> #include<iostream> #include<cstring> #include<cstdio> #i ...

  6. Linux进程管理 (7)实时调度

    关键词:RT.preempt_count.RT patch. 除了CFS调度器之外,还包括重要的实时调度器,有两种RR和FIFO调度策略.本章只是一个简单的介绍. 更详细的介绍参考<Linux进 ...

  7. 基于Vue.js 2.0 + Vuex打造微信项目

    一.项目简介 基于Vue + Vuex + Vue-router + Webpack 2.0打造微信界面,实现了微信聊天.搜索.点赞.通讯录(快速导航).个人中心.模拟对话.朋友圈.设置等功能. 二. ...

  8. 10分钟开发 GPS 应用,了解一下

    1 前言 在导师公司实习了半个月,参加的是尾气遥测项目,我的任务是开发GPS 的相关事情,从零到有的开发出了 GPS 的 Winform 应用,在这里记录一下开发过程和简要的描述一下将 GPS 数据提 ...

  9. C#.NET 大型通用信息化系统集成快速开发平台 4.0 版本 - 客户常用问题回答

    A.系统有两个添加用户 一个是申请用户.一个是添加用户.这两个分别在什么情况下使用? 回答 1:不是所有的用户都是管理员添加的,特别是分公司多,部门多时,都由管理员添加,效率低,而且很容易输入不精确的 ...

  10. hibernate坑边闲话3

    could not initialize proxy - no Session] with root cause org.hibernate.LazyInitializationException: ...