//javascriptvar ul = document.getElementById(‘ul); var as = ul.getElementsByTagName(‘a‘); for(var i = 0; i <as.length; i++) { as.item(i).onmouseover = function() { var iframe_con = document.getElementById(pos_content); var src = ‘./content/‘ + this.innerHTML + ‘.html‘; iframe_con.setAttribute(‘src‘, src); console.log(src); } } //jquery $("#um_div li a").mouseover(function () { $("#" + pos_content + "_content").attr(‘src‘, ‘content/‘ + this.innerHTML + ".html"); });
时间: 2024-11-05 06:26:05