JSP项目前端优化

问题:在谷歌浏览器中兼容问题,在点击超链接第一次会跳到头部,第二次点击才能打开的问题。

解决方案:是href的问题,删除href的属性,使用click事件,并添加a的超链接样式。

#othera{
color:blue; text-decoration:underline;
cursor:pointer;
}

function removehref()
{
$(".content").find(".grid-table").find("a").removeAttr("href");
}

并在body中添加删除href的属性。<body onmousedown="removehref();">

猜你喜欢

转载自www.cnblogs.com/yokiblogs/p/10142753.html