![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
文章平均质量分 75
humarzhu
这个作者很懒,什么都没留下…
展开
-
javascript prototype [note]
Prototype function Animal(type){ // create a class this.type = type; } Animal.prototype = { // add attribute or methods to class by using .prototype age : 0, // add at原创 2014-12-23 12:06:05 · 252 阅读 · 0 评论 -
jquery 动态添加、删除class样式
1.获取class和设置class都可以使用attr()方法来完成。 例如使用attr()方法来获取p元素的class: var p_class = $("p").attr("class"); //获取p元素的class 使用attr()方法来设置p元素的class, $("p").attr("'class", "high"); //设置p元素的class为 "hig转载 2014-12-23 14:41:51 · 782 阅读 · 0 评论 -
js插件 回到顶部效果(参考慕课网York老师相关课程)
css:#goTop {width:40px; height:40px; position:fixed; right:65px; bottom:10px; display:none; background:url(top_bg.png) no-repeat left top; z-index: 100;} #goTop:hover {background:url(top_bg.png) no-re原创 2014-12-26 17:57:42 · 386 阅读 · 0 评论 -
JS apply 方法详解
Js apply方法详解 我在一开始看到javascript的函数apply和call时,非常的模糊,看也看不懂,最近在网上看到一些文章对apply方法和call的一些示例,总算是看的有点眉目了,在这里我做如下笔记,希望和大家分享.. 如有什么不对的或者说法不明确的地方希望读者多多提一些意见,以便共同提高.. 主要我是要解决一下几个问题: 1. apply和call的转载 2015-02-03 12:45:23 · 398 阅读 · 0 评论