function getMyUData(a) { //console.log(a); //console.log(a.getAttribute('href')); if (a.getAttribute('href') == '#01') { return 'http' + '://' + '221' + '.233' + '.162' + '.227/' + 'jjh/' + 'jjh/' + 'index.jsp'; } else if (a.getAttribute('href') == '#02') { return 'http' + '://' + 'mail' + '.hgnu' + '.edu' + '.cn'; }else if (a.getAttribute('href') == '#smart') { return 'https' + '://' + 'www' + '.smartedu' + '.cn/'; }else if (a.getAttribute('href') == '/main.htm') { return '/mths/list.htm'; } return a.getAttribute('href'); } function testV6i(e) { //console.log(ev); //console.log(window.event); var ev = e || window.event; if (ev.preventDefault) { ev.preventDefault(); } else { ev.returnValue = false; } window.location.href = getMyUData(this); } //document.querySelector('.post-61').querySelector('.i4').querySelector('.link_icon').onclick = testV6i; //document.querySelector('.top-center').querySelector('.i2').querySelector('a').onclick = testV6i;