亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關于JavaScript中的window.open方法。

關于JavaScript中的window.open方法。

千萬里不及你 2019-05-10 11:06:40
今天下了Myeclipse,打算試試做jsp和Html然后寫了如下測試代碼;<!DOCTYPE html> WindowsDemo.html<meta name="keywords" content="keyword1,keyword2,keyword3"><meta name="description" content="this is mypage"><meta name="content-type" content="text/html;charset=UTF-8"><script>function fun(thisurl){window.open(thisurl,"頁面標題","width=370,heigth=160,scrollbars=yes,resizeable=no");}</script>
查看完整描述

2 回答

?
Smart貓小萌

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();”>

 




查看完整回答
反對 回復 2019-05-11
?
慕尼黑的夜晚無繁華

TA貢獻1864條經驗 獲得超6個贊


window.open(pageURL,name,parameters)
其中:
pageURL 為子窗口路徑
name 為子窗口句柄
parameters 為窗口參數(各參數用逗號分隔)



查看完整回答
反對 回復 2019-05-11
  • 2 回答
  • 0 關注
  • 507 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號