文章分类 -  前端

前端随机填充账户和密码
摘要:$("#account").val( "彭君华,郑洁,钟汉唐".split(",")[Math.floor(Math.random()*3)] ); 阅读全文
posted @ 2016-06-23 14:20 阿卡贝拉 阅读(127) 评论(0) 推荐(0)
js的call调用
摘要:call 方法 (Function) (JavaScript) 调用一个对象的方法,用另一个对象替换当前对象。 调用一个对象的方法,用另一个对象替换当前对象。 调用一个对象的方法,用另一个对象替换当前对象。 调用一个对象的方法,用另一个对象替换当前对象。 1.var write = document 阅读全文
posted @ 2016-04-23 13:15 阿卡贝拉 阅读(102) 评论(0) 推荐(0)
css背景图片偏移技术
摘要:From :http://www.lxway.com/905550421.htm 又如: 这些小图片就是整图分割后的各个部分,把各个部分放在一张图片上,而不是是分别存储成单独的图片,其目的我们都知道,就是减少http请求次数,节省时间和带宽。 那么怎么来实现一张图片在不同的地方只显示其中的一部分呢, 阅读全文
posted @ 2016-03-16 10:36 阿卡贝拉 阅读(8355) 评论(0) 推荐(0)
css每段缩进和rgba
摘要:CSS 每段缩进,段落开头前面空两格 text-indent:2em rgba(0,0,0,0.3) 阅读全文
posted @ 2016-03-02 11:18 阿卡贝拉 阅读(82) 评论(0) 推荐(0)
javascript:;
摘要:13down vote basically instead of using the link to move pages (or anchors), using this method launches a javascript function(s) <script> function doSo 阅读全文
posted @ 2016-02-18 16:19 阿卡贝拉 阅读(505) 评论(0) 推荐(0)
toString()
摘要:var weekday = foo.toString().substr(0, 3); 阅读全文
posted @ 2016-01-27 10:38 阿卡贝拉 阅读(79) 评论(0) 推荐(0)
输入框数字限制
摘要: 阅读全文
posted @ 2016-01-25 09:57 阿卡贝拉 阅读(148) 评论(0) 推荐(0)
输入框只能百分比
摘要:var yt = { checkBlur:function(obj){ var num = $(obj).val(); var hint=$(obj).parent().next().next(); var hintText=hint... 阅读全文
posted @ 2016-01-25 09:56 阿卡贝拉 阅读(1205) 评论(0) 推荐(0)
如何使用 jQuery 來啟用/停用元素?
摘要:// 方法 1:$('.form_ele').attr('disabled', true); // 方法 2:$('.form_ele').attr('disabled', 'disabled');attr('readonly',true); 都不能submit上传 阅读全文
posted @ 2016-01-25 09:53 阿卡贝拉 阅读(95) 评论(0) 推荐(0)
jquery遍历所有each
摘要:// $('input[type="text"]').each(function(){ // if($(this).val() == '') // alert('no'); // 不需要加 # ,封装过啦 阅读全文
posted @ 2016-01-23 11:14 阿卡贝拉 阅读(86) 评论(0) 推荐(0)
jquery输入框的输出来
摘要:Values: 阅读全文
posted @ 2016-01-23 10:48 阿卡贝拉 阅读(147) 评论(0) 推荐(0)
js的cookie处理2
摘要:在《JavaScript: The Definitive Guide, 4th Edition》中写到: In client-side JavaScript, a common use of escape( ) is to encode cookie values, which have restr... 阅读全文
posted @ 2016-01-22 11:34 阿卡贝拉 阅读(70) 评论(0) 推荐(0)
js的cookie处理
摘要:如何调用函数就很简单,直接使用setCookie("名","值")、getCookie("名")、delCookie("名")!访问Cookie 代码如下 复制代码document.write(document.cookie);//输出类似"name1=value1; name2=valu... 阅读全文
posted @ 2016-01-21 21:49 阿卡贝拉 阅读(118) 评论(0) 推荐(0)
onblur ,radio change
摘要:$('input[type=radio][name=bill]').change(function() { if (this.value == '1') { $('.bill').css('display','block'); } el... 阅读全文
posted @ 2016-01-21 17:28 阿卡贝拉 阅读(180) 评论(0) 推荐(0)
空格
摘要:半角的不断行的空白格(推荐使用)&ensp; 半角的空格 &emsp; 全角的空格 阅读全文
posted @ 2016-01-18 18:26 阿卡贝拉 阅读(116) 评论(0) 推荐(0)
How to add target=“_blank” to JavaScript window.location?
摘要:up vote33down voteacceptedwindow.location sets the url of your current window. To open a new window, you need to use window.open. This should work:fun... 阅读全文
posted @ 2016-01-17 14:17 阿卡贝拉 阅读(218) 评论(0) 推荐(0)
js 数学
摘要:1.数字转换成字符串 var a=10;a=string(a)2.字符串转换成数字var a ='10';a=Number(a);3.返回十进制整数a=parseInt(a,10);//第二位表示是进制,如果是2进制,就改成24返回浮点型var a="24.68tt";a=parseFloat(... 阅读全文
posted @ 2016-01-14 11:35 阿卡贝拉 阅读(116) 评论(0) 推荐(0)
js 门票
摘要: 阅读全文
posted @ 2016-01-14 11:34 阿卡贝拉 阅读(118) 评论(0) 推荐(0)
js字符串截取
摘要:js字符串截取函数slice()、substring()、substr();时间对象要用toString()方法转换成字符串 阅读全文
posted @ 2016-01-13 16:43 阿卡贝拉 阅读(68) 评论(0) 推荐(0)
js获取select的值
摘要:document.getElementById("bigclass").value 阅读全文
posted @ 2016-01-13 16:42 阿卡贝拉 阅读(63) 评论(0) 推荐(0)