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個贊
添加回答
舉報