加入: <base target="_self" />便可。 javascript
注:但這個設置只對普通連接有效,對window.location.href 打開的連接無效。 html
對於表單提交打開新窗口,在子窗口中加入: java
<script type="text/javascript"> spa
window.name="spare" ; orm
</script> htm
<form target="spare"> ip
注:form 表單設置成 target="_self"是無效的。 get