会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
永不言拜
莫等待,光阴不会复来。
博客园
首页
新随笔
联系
管理
订阅
jQuery插件的写法
jQuery.fn.extend(
{
check:
function
(mode)
{
var
mode
=
mode
||
'on';
return
this
.each(
function
()
{
switch(mode)
{
case
'on':
this
.checked
=
true
;
break
;
case
'off':
this
.checked
=
false
;
break
;
case
'toggle':
this
.checked
=!
this
.checked;
break
;
}
}
);
}
}
);
当你看了jQuery里面的代码和API,就知道是什么回事了.是不是更微软的Ajax Library的写法类似呢!
这个是全选和取消全选的方法.调用方法:
$("input[@type='checkbox']").check('toggle');
附录:
CSS编写软件:TopStyle
JavaScript:调试器:FireFox的venkman
posted @
2007-03-21 17:00
永不言败
阅读(
1746
) 评论(
2
)
收藏
举报
刷新页面
返回顶部
公告