두 코드 모두 매우 간단하므로 여기서는 말도 안되는 말을하지 않고 코드를 업로드하기 만하면됩니다.
코드 1,
함수 ntabs (thisobj, num) {if (thisobj.classname == "active") return; var tabobj = thisobj.parentnode.id; var toldist = document.getElementById (tabobj) .getElementsByTagName ( "li"); for (i = 0; i <TACKES.Length; i ++) {if (i == num) {thisObj.className = "active"; document.getElementById (tabobj+"_ cont"+i) .style.display = "block"; } else {tableist [i] .className = "정상"; document.getElementById (tabobj+"_ cont"+i) .style.display = "none"; }}}코드 2,
$ (document) .ready (function () {var $ tab_li = $ ( '. tab ul li'); $ tab_li.hover (function () {$ (this) .addclass ( 'selected'). siblings (). removeclass ( 'selected'); var index = $ tab_li.index (this); $ ( 'div.tab_box box). div '). eq (index) .show ().