这是我的javascript代码:JavaScript的表格功能如何主动类添加到激活键
<script type="text/javascript">
var showcont = [];
var showcont_containers = [];
$('#tabs ul li a').each(function() {
// note that this only compares the pathname, not the entire url
// which actually may be required for a more terse solution.
if (this.pathname == window.location.pathname) {
showcont.push(this);
showcont_containers.push($(this.hash).get(0));
};
});
$(showcont).click(function(e){
$(showcont_containers).hide().filter(this.hash).fadeIn();
e.preventDefault();
});
</script>
如何主动类添加到#tabs ul li a
?请帮助我
这不是一个JavaScript的问题,标记问题的答案是 –
这是代码.. –