2 回答
TA贡献1911条经验 获得超7个赞
语法
open(URL, windowName, windowFeatures)
参数
URL
A string specifying the URL to open in the new window. See the Location object for a描述 of the URL components.
windowName
A string specifying the window name to use in the TARGET attribute of a FORM or A tag. windowName can contain only alphanumeric or underscore (_) characters.
windowFeatures
(Optional) A string containing a comma-separated list determining whether or not to create various standard window features. These options are described below.
windowName的参数取值为_blank,_self,_top,_parent,他们的含义与html中相同。
如:
<script language="javascript">
function backToIndex(){
window.open("../index.jsp","_parent");
}
</script>
<input type="submit" name="Submit" value="提交" onclick=” backToIndex();”>是不会响应的,这样就会响应:
<input type="button" name="Submit" value="提交" onclick=” backToIndex();”>
TA贡献1864条经验 获得超6个赞
添加回答
举报