jquery,javascript -设置某一ul下的li下的 a的属性

//javascript
var 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");
});
上一篇:dede织梦后台-退出空白,注销空白,打开空白,登录返回首页,登录返回登录页面


下一篇:[JS]jQuery,javascript获得网页的高度和宽度