這是我的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的問題,標記問題的答案是 –
這是代碼.. –