Try:
<input type=button onclick='window.open("b.htm")'>b.htm:
<a onclick="javascript:opener.location.href='http://www.163.com;window.close();'">163</a><br>
<a onclick="javascript:opener.location.href='http://www.csdn.com;window.close();'">csdn</a><br>
<input type=button onclick='window.open("b.htm")'>b.htm:
<a onclick="javascript:opener.location.href='http://www.163.com;window.close();'">163</a><br>
<a onclick="javascript:opener.location.href='http://www.csdn.com;window.close();'">csdn</a><br>
a.htm
<input type=button onclick="window.open('b.htm')" value="打开">b.htm
<a href="#" onclick="javascript:opener.location.href='http://www.163.com';window.close();">163</a><br>
<a href="#" onclick="javascript:opener.location.href='http://www.csdn.com';window.close();">csdn</a><br>