首页
电影
新闻
新片
热映
排行榜
影评
专题
电影查询
电视
新闻
新剧
热播
排行榜
电视剧查询
人物
新闻
八卦
人物访谈
排行榜
视频
图片
博客
电影电视
明星时尚
文化生活
相册
会员
群组
我的同城
活动
热门话题
群组分类
群组人气榜
游戏
问答游戏
图片评分
电影院

ing...

keeping things as absolutely simple as possible

http://www.mtime.com/my/goodidea/
你现在的位置:时光网>>博客>>袁剑的博客>>标签>>javascript
标签

用好你的Prototype

1、
document.getElementById('foo')
==>
$('foo')
2、
var woot = document.getElementById('bar').valuevar
woot = $('bar').value
==>
var woot = $F('bar')
3、
$('footer').style.height = '100px';
$('footer').style.background = '#ffc';   
==>
$('footer').setStyle({
    height: '100px',
    background: '#ffc'
})
4、
$('coolestWidgetEver').innerHTML = 'some nifty content'
==>
$('coolestWidgetEver').update('some nifty content')
2007-08-28 08:34回复(0)|引用(0)|收藏(0)|688次阅读