语法
open(URL, windowName, windowFeatures)
参数
A string specifying the URL to open in the new window. See the Location object for a描述 of the URL components. | |
A string specifying the window name to use in the TARGET attribute of a | |
windowName的参数取值为_blank,_self,_top,_parent,他们的含义与html中相同。
如:
<script language="javascript">
function backToIndex(){
window.open("../index.jsp","_parent");
}
</script>
<input type="submit" name="Submit" value="提交" οnclick=” backToIndex();”>是不会响应的,这样就会响应:
<input type="button" name="Submit" value="提交" οnclick=” backToIndex();”>