![](https://img-blog.csdnimg.cn/20190927151124774.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
JavaScript
JavaScript 系列文章,基础 + 进阶知识整理。
昆吾kw
这个作者很懒,什么都没留下…
展开
-
利用JS实现百度换肤效果
这里的百度换肤效果,就是点击一张图片,系统自动将这张图片设为背景。具体代码: 利用JS实现百度换肤效果 body,div { margin: 0; padding: 0; } body { background: url(images/1.jpg) no-repeat top center; } .b原创 2016-08-05 01:59:13 · 2049 阅读 · 0 评论 -
问题:做了一个获得焦点和失去焦点的js,为什么在火狐上运行都是先失去后获得?
而在谷歌和IE上运行却是正常的。JS代码: window.onload = function(){ var txt = document.getElementById("txt"); txt.onfocus = function(){ //得到焦点 alert("得到了焦点"); //可以测试有没有得到焦点 } txt.onblur = function原创 2016-08-05 21:11:52 · 1476 阅读 · 0 评论