function $(id) {
this.hide = function(){
document.getElementById(id).style.display='none';
};
this.show = function() {
document.getElementById(id).style.display='block';
};
this.html = function(str){
document.getElementById(id).innerHTML=str;
}
}
要实现的功能,就要使用面向对象编程,上面的例子很简单,只是实现你问题中最简单的三个方法,让你了解下思想
如果要实现Jquery的大致功能,结构会较复杂,估计一下子吸收不了,慢慢来吧
recursion