1,click单击事件2,blur失去光标事件,focus获得光标事件3,JQuery.on()函数:为html元素绑定事件,如下代码:1 $("div").on("click","p",function(){$(this).addClass("colorRed")});点击div中...
分类:
Web程序 时间:
2015-07-30 00:27:03
阅读次数:
148
isNaN()函数用于检查其参数是否是非数字值。if(isNaN(document.getElementById("oid").value)){
alert("请输入数字");
document.getElementById("oid").focus();
returnfalse;
}参考文章:http://www.jb51.net/article/35530.htm
分类:
编程语言 时间:
2015-07-29 19:37:44
阅读次数:
142
本文的主要内容来自《Functional Programming in Swift》这本书,有点所谓的观后总结在本书的Introduction章中:we will try to focus on some of the qualities that we believe well-designed ...
分类:
编程语言 时间:
2015-07-29 13:55:16
阅读次数:
161
var obj = document.getElementById(obj_Id);obj.select();
window.parent.document.body.focus(); // <——–添加该行后,真的成功了
path = document.selection.createRange().text;
直接上代码,如果不增加第3行代码,浏览器会报拒绝访问;如果设置了Inter...
分类:
Web程序 时间:
2015-07-28 21:13:34
阅读次数:
257
div{ tap-highlight-color: rgba(0,0,0,0); focus-ring-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-focus-rin...
分类:
移动开发 时间:
2015-07-27 14:55:33
阅读次数:
188
http://focus.china.com.cn/s/toutiao/2015/07/26/356239.html信息时报讯 昨日下午,胡润研究院发布《2015胡润浙江地区财富报告》。据胡润研究院统计,浙江地区高净值人群数量全国排名第4,浙江每380人中有一人是千万富豪,每6200人中有一人是亿万...
分类:
其他好文 时间:
2015-07-26 10:57:12
阅读次数:
116
在html中引用下面的js文件,且在样式文件中这样写:input,textarea{color:#999;} input:focus,textarea:focus{color:#333;}
我这里只是简单的用全局样式这样写了,如果你不想所有的input框都有提示,可以给需要的input特定的类,比如:.txt{color:#999;} .txt:focus{color:...
分类:
其他好文 时间:
2015-07-23 17:47:33
阅读次数:
120
HTML5的autofocus属性用法简单介绍:本章节简单介绍一下HTML5中新增的一个属性autofocus,它可以让一个元素加载后获取焦点,在此之前一般要通过使用javascript的focus()方法实现我们的要求,非常的简单,代码如下:蚂蚁部落原文地址是:http://www.51texia...
分类:
Web程序 时间:
2015-07-23 13:47:11
阅读次数:
643
利用D3.js库实现Focus+Context的折线图,读取data.tsv文件数据
index.html
svg {
font: 10px sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.line {
fill: no...
分类:
Web程序 时间:
2015-07-22 18:49:52
阅读次数:
204
直接在onblur事件里面写foucs事件,让输入框有鼠标焦点。但是没有效果。经过查找资料后,终于找到解决方法:
分类:
Web程序 时间:
2015-07-22 16:02:30
阅读次数:
125