会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
quitpoison
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
11
下一页
2018年5月4日
JS中的call()方法和apply()方法用法总结
摘要: 1. 每个函数都包含两个非继承而来的方法:call()方法和apply()方法。 2. 相同点:这两个方法的作用是一样的。 都是在特定的作用域中调用函数,等于设置函数体内this对象的值,以扩充函数赖以运行的作用域。 一般来说,this总是指向调用某个方法的对象,但是使用call()和apply()
阅读全文
posted @ 2018-05-04 14:10 quitpoison
阅读(206)
评论(0)
推荐(0)
2018年4月28日
JS实现倒计时(天数,时,分,秒)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8" > <title>JS实现倒计时(天数,时,分,秒)</title> <link rel="stylesheet" type="text/css" href="../css/reset.css">
阅读全文
posted @ 2018-04-28 17:08 quitpoison
阅读(1114)
评论(0)
推荐(0)
2018年4月12日
jQuery -- 监听input、textarea输入框值变化
摘要: $('textarea').bind('input propertychange', function(){ if($(".textareachange").val() != ""){ $("#sendbtn").removeClass("disabled"); }else{ $("#sendbtn
阅读全文
posted @ 2018-04-12 16:41 quitpoison
阅读(5689)
评论(0)
推荐(0)
使用jQuery设置disabled属性与移除disabled属性
摘要: //两种方法设置disabled属性 $('#areaSelect').attr("disabled",true); $('#areaSelect').attr("disabled","disabled"); //三种方法移除disabled属性 $('#areaSelect').attr("dis
阅读全文
posted @ 2018-04-12 16:38 quitpoison
阅读(3582)
评论(0)
推荐(0)
中英文自动换行
摘要: 中文自动换行 word-wrap:break-word; 中文自动换行 word-wrap:break-word; 英文自动换行 word-break: break-all 1、在需要强制设置换行时, td中:需用css来控制style='word-break: break-all' div中 :
阅读全文
posted @ 2018-04-12 16:37 quitpoison
阅读(1770)
评论(0)
推荐(0)
占满屏幕的宽高,当把textarea换成其他标签的时候,怎么才能编辑?
摘要: $('.nav').width($(window).width()); $('.nav').height($(window).height()); 当把textarea换成其他标签的时候,怎么才能编辑? 在标签中添加 contenteditable="true" 当把textarea换成其他标签的时
阅读全文
posted @ 2018-04-12 16:15 quitpoison
阅读(395)
评论(0)
推荐(0)
鼠标点击文本框后,里面的文字就消失或全选中
摘要: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>鼠标点击文本框后,里面的文字就消失或全选中</title> </head> <body
阅读全文
posted @ 2018-04-12 16:13 quitpoison
阅读(1698)
评论(0)
推荐(0)
2018年4月11日
jquery中选取兄弟节点的方法
摘要: $('#id').siblings() 当前元素所有的兄弟节点$('#id').prev() 当前元素前一个兄弟节点$('#id').prevaAll() 当前元素之前所有的兄弟节点$('#id').next() 当前元素之后第一个兄弟节点$('#id').nextAll() 当前元素之后所有的兄弟
阅读全文
posted @ 2018-04-11 11:15 quitpoison
阅读(2921)
评论(0)
推荐(0)
滚动条的样式
摘要: ::-webkit-scrollbar { width: 15px; } /* 这是针对缺省样式 (必须的) */ ::-webkit-scrollbar { width: 15px; } /* 这是针对缺省样式 (必须的) */ ::-webkit-scrollbar-track { backgr
阅读全文
posted @ 2018-04-11 10:43 quitpoison
阅读(122)
评论(0)
推荐(0)
文本出现省略号
摘要: 一行的时候 .text1 { width:200px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; -webkit-text-overflow:ellipsis; -moz-text-overflow:ell
阅读全文
posted @ 2018-04-11 10:43 quitpoison
阅读(112)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
下一页
公告