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. 【html】使ifram搭建的项目,新页面跳出框架

    方法一: <a href="<?php echo $baseUrl . '#/study/order';?>" target="_parent" ...

  2. Control4系统对接arduino

    https://www.chowmainsoft.com/arduino int digitalState[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; v ...

  3. JDK动态代理(3)--------动态代理具体实现

    写个HelloWorld 接口 package com.spring.aop.proxy; public interface HelloWorld { public void sayHello(); ...

  4. koa2中间件koa和koa-compose源码分析原理(一)

    koa是基于nodejs平台的下一代web开发框架,它是使用generator和promise,koa的中间件是一系列generator函数的对象.当对象被请求过来的时候,会依次经过各个中间件进行处理 ...

  5. odoo学习总结

                                                   odoo10总结 1.odoo中的向导应用. .py文件 # -*- coding: utf-8 -*-f ...

  6. Spring Cloud 入门教程(八): 断路器指标数据监控Hystrix Dashboard 和 Turbine

    1. Hystrix Dashboard (断路器:hystrix 仪表盘)  Hystrix一个很重要的功能是,可以通过HystrixCommand收集相关数据指标. Hystrix Dashboa ...

  7. Git&Github基本操作与分支管理

    Git的原理涉及快照流.链表.指针等,这里不作过多叙述. 1.基本操作 git init 创建一个 Git 仓库 git clone [url] 拷贝一个 Git 仓库到本地 git add [fil ...

  8. JDK命令行(jps、jstat、jinfo、jmap、jhat、jstack、jstatd、hprof)与JConsole

    很多资料在介绍JDK命令行工具时并不是在Java8环境下,因此还在使用过时的永久区系列的参数,给一些读者造成困难. Java8使用Metaspace(元空间)代替永久区,对于64位平台,为了压缩JVM ...

  9. mongo中的模糊查询

    以下是一个mongo查询的综合应用,即介绍一个生产中实际应用的模糊查询,当然其实也很简单,主要用到mongo中的模糊查询和$or查询,以及并的关系,下面是一个mongo中的一条记录 { "_ ...

  10. 1. FPGA内部的逻辑资源

    CLB(包括LUT.加法器.寄存器.MUX(多路选择器)) 时钟网络资源(全局时钟网络,区域时钟网络,IO时钟网络),理解时钟网络的本质和意义 时钟处理单元(PLL,DCM),理解时钟网络资源和时钟处 ...