随笔分类 -  js

摘要:原函数function test() {alert('test');}test();首先我们先了解 函数调用的一种用法 在一个函数后加括号,括号里面可以加上参数传递原函数可以这么改(function test() {alert('test');})();匿名函数(function() {alert('test');})();匿名函数的链式调用(function() {alert('test');return arguments.callee;})()();return arguments.callee简单地讲就是返回函数本身(fu 阅读全文
posted @ 2013-05-05 15:25 firesnow 阅读(596) 评论(0) 推荐(0)
摘要:原函数function test() {alert('test');}test();匿名写法1(function() {alert('test');})();匿名写法2(function(o) {alert(o);})('test');匿名写法3~(function(){ alert('test'); })();//写法有点酷~ 匿名写法4void function(){ alert('test'); }();//据说效率最高~ 匿名写法5+function(){ alert('test'); }( 阅读全文
posted @ 2013-05-05 15:23 firesnow 阅读(366) 评论(0) 推荐(0)
摘要:<select id="year"> <option value="">年</option> </select> <select id="month"> <option value="">月</option> </select> <select id="day"> <option value="">日</option> </select&g 阅读全文
posted @ 2013-04-26 00:00 firesnow 阅读(255) 评论(0) 推荐(0)
摘要:html代码 用户名 跟随 新外汇指数 月均交易(手) 账户余额($) 近一个月收益 当前持仓(单) ... 阅读全文
posted @ 2013-04-07 23:36 firesnow 阅读(47713) 评论(1) 推荐(5)
摘要:多选框判断是否选中$("input[name='name']").attr("checked") != 'checked'判断选中个数var show_count = 0$("input[name='userlist[]']:checked").each(function(){ if($(this).attr("checked")){ show_count++ }})下拉菜单<select />改变选中状态,查找出被选中的元素 $("#selec 阅读全文
posted @ 2012-06-01 19:42 firesnow 阅读(378) 评论(0) 推荐(0)