a标签里如何先执行href跳转页面,再执行onclick关闭当前页面事件

代码如下

<a class="message-list-item"  ew7-href="'+  Feng.ctxPath + '/blogAdd/view?blogId=' + res.data[i].blogId +'&comId='+res.data[i].comId+ "&type=search"+'"  onclick="parent.layer.close(parent.layer.getFrameIndex(window.name))">

https://www.cnblogs.com/YYvam1288/p/7148929.html?utm_source=itdadao&utm_medium=referral