javascript showModalDialog傳值與FireFox的window.open 父子窗口傳值示例第1/2頁(yè)
更新時(shí)間:2009年11月08日 22:36:15 作者:
javascript showModalDialog傳值與FireFox的window.open 父子窗口傳值示例代碼。
先簡(jiǎn)單介紹一下基本知識(shí):
一、window.open()支持環(huán)境: Java1.0+/J1.0+/Nav2+/IE3+/Opera3+
二、基本語(yǔ)法:
window.open(pageURL,name,parameters)
其中:
pageURL 為子窗口路徑
name 為子窗口句柄
parameters 為窗口參數(shù)(各參數(shù)用逗號(hào)分隔)
三、各項(xiàng)參數(shù)
其中yes/no也可使用1/0;pixel value為具體的數(shù)值,單位象素。
參數(shù) | 取值范圍 | 說(shuō)明
alwaysLowered | yes/no | 指定窗口隱藏在所有窗口之后
alwaysRaised | yes/no | 指定窗口懸浮在所有窗口之上
depended | yes/no | 是否和父窗口同時(shí)關(guān)閉
directories | yes/no | Nav2和3的目錄欄是否可見
height | pixel value | 窗口高度
hotkeys | yes/no | 在沒菜單欄的窗口中設(shè)安全退出熱鍵
innerHeight | pixel value | 窗口中文檔的像素高度
innerWidth | pixel value | 窗口中文檔的像素寬度
location | yes/no | 位置欄是否可見
menubar | yes/no | 菜單欄是否可見
outerHeight | pixel value | 設(shè)定窗口(包括裝飾邊框)的像素高度
outerWidth | pixel value | 設(shè)定窗口(包括裝飾邊框)的像素寬度
resizable | yes/no | 窗口大小是否可調(diào)整
screenX | pixel value | 窗口距屏幕左邊界的像素長(zhǎng)度
screenY | pixel value | 窗口距屏幕上邊界的像素長(zhǎng)度
scrollbars | yes/no | 窗口是否可有滾動(dòng)欄
titlebar | yes/no | 窗口題目欄是否可見
toolbar | yes/no | 窗口工具欄是否可見
Width | pixel value | 窗口的像素寬度
z-look | yes/no | 窗口被激活后是否浮在其它窗口之上
window.showModalDialog使用手冊(cè)
基本介紹:
showModalDialog() (IE 4+ 支持)
showModelessDialog() (IE 5+ 支持)
window.showModalDialog()方法用來(lái)創(chuàng)建一個(gè)顯示HTML內(nèi)容的模態(tài)對(duì)話框。
window.showModelessDialog()方法用來(lái)創(chuàng)建一個(gè)顯示HTML內(nèi)容的非模態(tài)對(duì)話框。
使用方法:
vReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
參數(shù)說(shuō)明:
sURL--
必選參數(shù),類型:字符串。用來(lái)指定對(duì)話框要顯示的文檔的URL。
vArguments--
可選參數(shù),類型:變體。用來(lái)向?qū)υ捒騻鬟f參數(shù)。傳遞的參數(shù)類型不限,包括數(shù)組等。對(duì)話框通過(guò)window.dialogArguments來(lái)取得傳遞進(jìn)來(lái)的參數(shù)。
sFeatures--
可選參數(shù),類型:字符串。用來(lái)描述對(duì)話框的外觀等信息,可以使用以下的一個(gè)或幾個(gè),用分號(hào)“;”隔開。
1.dialogHeight :對(duì)話框高度,不小于100px,IE4中dialogHeight 和 dialogWidth 默認(rèn)的單位是em,而IE5中是px,為方便其見,在定義modal方式的對(duì)話框時(shí),用px做單位。
2.dialogWidth: 對(duì)話框?qū)挾取?
3.dialogLeft: 離屏幕左的距離。
4.dialogTop: 離屏幕上的距離。
5.center: {yes | no | 1 | 0 }:窗口是否居中,默認(rèn)yes,但仍可以指定高度和寬度。
6.help: {yes | no | 1 | 0 }:是否顯示幫助按鈕,默認(rèn)yes。
7.resizable: {yes | no | 1 | 0 } [IE5+]:是否可被改變大小。默認(rèn)no。
8.status: {yes | no | 1 | 0 } [IE5+]:是否顯示狀態(tài)欄。默認(rèn)為yes[ Modeless]或no[Modal]。
9.scroll:{ yes | no | 1 | 0 | on | off }:指明對(duì)話框是否顯示滾動(dòng)條。默認(rèn)為yes。
下面幾個(gè)屬性是用在HTA中的,在一般的網(wǎng)頁(yè)中一般不使用。
10.dialogHide:{ yes | no | 1 | 0 | on | off }:在打印或者打印預(yù)覽時(shí)對(duì)話框是否隱藏。默認(rèn)為no。
11.edge:{ sunken | raised }:指明對(duì)話框的邊框樣式。默認(rèn)為raised。
12.unadorned:{ yes | no | 1 | 0 | on | off }:默認(rèn)為no。
參數(shù)傳遞:
1.要想對(duì)話框傳遞參數(shù),是通過(guò)vArguments來(lái)進(jìn)行傳遞的。類型不限制,對(duì)于字符串類型,最大為4096個(gè)字符。也可以傳遞對(duì)象,例如:
-------------------------------
parent.htm
<script type="text/javascript">
var obj = new Object();
obj.name="51js";
window.showModalDialog("modal.htm",obj,"dialogWidth=200px;dialogHeight=100px");
</script>
modal.htm
<script type="text/javascript">
var obj = window.dialogArguments
alert("您傳遞的參數(shù)為:" + obj.name)
</script>
-------------------------------
2.可以通過(guò)window.returnValue向打開對(duì)話框的窗口返回信息,當(dāng)然也可以是對(duì)象。例如:
------------------------------
parent.htm
< type="text/java">
str =window.showModalDialog("modal.htm",,"dialogWidth=200px;dialogHeight=100px");
alert(str);
</script>
modal.htm
<script type="text/javascript">
window.returnValue="http://www.dbjr.com.cn";
</script>
在IE中,我們可以使用showModalDialog來(lái)傳值。
語(yǔ)法如下:
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
但是.在Firefox中卻沒有showModalDialog方法,不過(guò)我們可以用window.open()
語(yǔ)法如下:
oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
只是,在Firefox下,window.open的參數(shù)中,sFeature多了一些功能設(shè)定,而在FireFox下要讓開啟的視窗跟IE的showModalDialog一樣的話,只要在sFeatures中加個(gè)modal=yes就可以了。
下面用一個(gè)示例來(lái)說(shuō)明其用法。
功能說(shuō)明:從子窗口中輸入顏色種類提交到父窗口,并添加選項(xiàng)到下拉列表。
a.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>a.html文檔</title>
<script language="javascript">
function openstr()
{
ReturnValue=window.showModalDialog("b.html",window,"dialogWidth=510px;dialogHeight=150px;status=no");
if(ReturnValue && ReturnValue!="")
{
oOption = document.createElement('OPTION');
oOption.text=ReturnValue;
oOption.value=ReturnValue;
document.all.txtselect.add(oOption);
}
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<select name="txtselect" id="txtselect">
</select>
</label>
<label>
<input type="button" name="Submit" value="打開子窗口" onclick="openstr()" />
</label>
</form>
</body>
</html>
b.html
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>b.html文檔</title>
<script language="javascript">
function ClickOk()
{
var t=document.Edit;
var url=t.color.value;
if(url==null||url=="填寫顏色") return(false);
window.returnValue=url;
window.close();
}
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="2" align="center" width="300">
<form name="Edit" id="Edit">
<tr>
<td width="30" align="right" height="30">color:</td>
<td height="30"><input type="text" name="color" value="填寫顏色" /></td>
<td width="56" align="center" height="30"><input " type="button" name="bntOk" value="確認(rèn)" onclick="ClickOk();" /> </td>
</tr>
</form>
</table>
</body>
</html>
修改為兼容IE和FireFoxr的代碼如下:
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>a.html文檔</title>
<script type="text/javascript">
function openstr()
{
window.open("b.html","","modal=yes,width=500,height=500,resizable=no,scrollbars=no");
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<select name="txtselect" id="txtselect">
</select>
</label>
<label>
<input type="button" name="Submit" value="打開子窗口" onclick="openstr()" />
</label>
</form>
</body>
</html>
b.html
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>b.html文檔</title>
<script type="text/javascript">
function ClickOk()
{
var t=document.Edit;
var color=t.color.value;
if(color==null||color=="填寫顏色") return(false);
var oOption = window.opener.document.createElement('OPTION');
oOption.text=url;
oOption.value=url;
//檢查瀏覽器類型
var bname = navigator.appName;
if (bname.search(/netscape/i) == 0)
{
window.opener.document.getElementById("txtselect").appendChild(oOption);
}
else if (bname.search(/microsoft/i) == 0)
{
window.opener.document.all.txtselect.add(oOption);
}
else
{
}
window.close();
}
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="2" align="center" width="300">
<form name="Edit" id="Edit">
<tr>
<td width="30" align="right" height="30">color:</td>
<td height="30"><input type="text" name="color" value="填寫顏色" /></td>
<td width="56" align="center" height="30"><input " type="button" name="bntOk" value="確認(rèn)" onclick="ClickOk();" /> </td>
</tr>
</form>
</table>
</body>
</html>
一、window.open()支持環(huán)境: Java1.0+/J1.0+/Nav2+/IE3+/Opera3+
二、基本語(yǔ)法:
window.open(pageURL,name,parameters)
其中:
pageURL 為子窗口路徑
name 為子窗口句柄
parameters 為窗口參數(shù)(各參數(shù)用逗號(hào)分隔)
三、各項(xiàng)參數(shù)
其中yes/no也可使用1/0;pixel value為具體的數(shù)值,單位象素。
參數(shù) | 取值范圍 | 說(shuō)明
alwaysLowered | yes/no | 指定窗口隱藏在所有窗口之后
alwaysRaised | yes/no | 指定窗口懸浮在所有窗口之上
depended | yes/no | 是否和父窗口同時(shí)關(guān)閉
directories | yes/no | Nav2和3的目錄欄是否可見
height | pixel value | 窗口高度
hotkeys | yes/no | 在沒菜單欄的窗口中設(shè)安全退出熱鍵
innerHeight | pixel value | 窗口中文檔的像素高度
innerWidth | pixel value | 窗口中文檔的像素寬度
location | yes/no | 位置欄是否可見
menubar | yes/no | 菜單欄是否可見
outerHeight | pixel value | 設(shè)定窗口(包括裝飾邊框)的像素高度
outerWidth | pixel value | 設(shè)定窗口(包括裝飾邊框)的像素寬度
resizable | yes/no | 窗口大小是否可調(diào)整
screenX | pixel value | 窗口距屏幕左邊界的像素長(zhǎng)度
screenY | pixel value | 窗口距屏幕上邊界的像素長(zhǎng)度
scrollbars | yes/no | 窗口是否可有滾動(dòng)欄
titlebar | yes/no | 窗口題目欄是否可見
toolbar | yes/no | 窗口工具欄是否可見
Width | pixel value | 窗口的像素寬度
z-look | yes/no | 窗口被激活后是否浮在其它窗口之上
window.showModalDialog使用手冊(cè)
基本介紹:
showModalDialog() (IE 4+ 支持)
showModelessDialog() (IE 5+ 支持)
window.showModalDialog()方法用來(lái)創(chuàng)建一個(gè)顯示HTML內(nèi)容的模態(tài)對(duì)話框。
window.showModelessDialog()方法用來(lái)創(chuàng)建一個(gè)顯示HTML內(nèi)容的非模態(tài)對(duì)話框。
使用方法:
vReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
參數(shù)說(shuō)明:
sURL--
必選參數(shù),類型:字符串。用來(lái)指定對(duì)話框要顯示的文檔的URL。
vArguments--
可選參數(shù),類型:變體。用來(lái)向?qū)υ捒騻鬟f參數(shù)。傳遞的參數(shù)類型不限,包括數(shù)組等。對(duì)話框通過(guò)window.dialogArguments來(lái)取得傳遞進(jìn)來(lái)的參數(shù)。
sFeatures--
可選參數(shù),類型:字符串。用來(lái)描述對(duì)話框的外觀等信息,可以使用以下的一個(gè)或幾個(gè),用分號(hào)“;”隔開。
1.dialogHeight :對(duì)話框高度,不小于100px,IE4中dialogHeight 和 dialogWidth 默認(rèn)的單位是em,而IE5中是px,為方便其見,在定義modal方式的對(duì)話框時(shí),用px做單位。
2.dialogWidth: 對(duì)話框?qū)挾取?
3.dialogLeft: 離屏幕左的距離。
4.dialogTop: 離屏幕上的距離。
5.center: {yes | no | 1 | 0 }:窗口是否居中,默認(rèn)yes,但仍可以指定高度和寬度。
6.help: {yes | no | 1 | 0 }:是否顯示幫助按鈕,默認(rèn)yes。
7.resizable: {yes | no | 1 | 0 } [IE5+]:是否可被改變大小。默認(rèn)no。
8.status: {yes | no | 1 | 0 } [IE5+]:是否顯示狀態(tài)欄。默認(rèn)為yes[ Modeless]或no[Modal]。
9.scroll:{ yes | no | 1 | 0 | on | off }:指明對(duì)話框是否顯示滾動(dòng)條。默認(rèn)為yes。
下面幾個(gè)屬性是用在HTA中的,在一般的網(wǎng)頁(yè)中一般不使用。
10.dialogHide:{ yes | no | 1 | 0 | on | off }:在打印或者打印預(yù)覽時(shí)對(duì)話框是否隱藏。默認(rèn)為no。
11.edge:{ sunken | raised }:指明對(duì)話框的邊框樣式。默認(rèn)為raised。
12.unadorned:{ yes | no | 1 | 0 | on | off }:默認(rèn)為no。
參數(shù)傳遞:
1.要想對(duì)話框傳遞參數(shù),是通過(guò)vArguments來(lái)進(jìn)行傳遞的。類型不限制,對(duì)于字符串類型,最大為4096個(gè)字符。也可以傳遞對(duì)象,例如:
-------------------------------
parent.htm
復(fù)制代碼 代碼如下:
<script type="text/javascript">
var obj = new Object();
obj.name="51js";
window.showModalDialog("modal.htm",obj,"dialogWidth=200px;dialogHeight=100px");
</script>
modal.htm
復(fù)制代碼 代碼如下:
<script type="text/javascript">
var obj = window.dialogArguments
alert("您傳遞的參數(shù)為:" + obj.name)
</script>
-------------------------------
2.可以通過(guò)window.returnValue向打開對(duì)話框的窗口返回信息,當(dāng)然也可以是對(duì)象。例如:
------------------------------
parent.htm
復(fù)制代碼 代碼如下:
< type="text/java">
str =window.showModalDialog("modal.htm",,"dialogWidth=200px;dialogHeight=100px");
alert(str);
</script>
modal.htm
復(fù)制代碼 代碼如下:
<script type="text/javascript">
window.returnValue="http://www.dbjr.com.cn";
</script>
在IE中,我們可以使用showModalDialog來(lái)傳值。
語(yǔ)法如下:
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
但是.在Firefox中卻沒有showModalDialog方法,不過(guò)我們可以用window.open()
語(yǔ)法如下:
oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
只是,在Firefox下,window.open的參數(shù)中,sFeature多了一些功能設(shè)定,而在FireFox下要讓開啟的視窗跟IE的showModalDialog一樣的話,只要在sFeatures中加個(gè)modal=yes就可以了。
下面用一個(gè)示例來(lái)說(shuō)明其用法。
功能說(shuō)明:從子窗口中輸入顏色種類提交到父窗口,并添加選項(xiàng)到下拉列表。
a.html
復(fù)制代碼 代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>a.html文檔</title>
<script language="javascript">
function openstr()
{
ReturnValue=window.showModalDialog("b.html",window,"dialogWidth=510px;dialogHeight=150px;status=no");
if(ReturnValue && ReturnValue!="")
{
oOption = document.createElement('OPTION');
oOption.text=ReturnValue;
oOption.value=ReturnValue;
document.all.txtselect.add(oOption);
}
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<select name="txtselect" id="txtselect">
</select>
</label>
<label>
<input type="button" name="Submit" value="打開子窗口" onclick="openstr()" />
</label>
</form>
</body>
</html>
b.html
復(fù)制代碼 代碼如下:
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>b.html文檔</title>
<script language="javascript">
function ClickOk()
{
var t=document.Edit;
var url=t.color.value;
if(url==null||url=="填寫顏色") return(false);
window.returnValue=url;
window.close();
}
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="2" align="center" width="300">
<form name="Edit" id="Edit">
<tr>
<td width="30" align="right" height="30">color:</td>
<td height="30"><input type="text" name="color" value="填寫顏色" /></td>
<td width="56" align="center" height="30"><input " type="button" name="bntOk" value="確認(rèn)" onclick="ClickOk();" /> </td>
</tr>
</form>
</table>
</body>
</html>
修改為兼容IE和FireFoxr的代碼如下:
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>a.html文檔</title>
<script type="text/javascript">
function openstr()
{
window.open("b.html","","modal=yes,width=500,height=500,resizable=no,scrollbars=no");
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<select name="txtselect" id="txtselect">
</select>
</label>
<label>
<input type="button" name="Submit" value="打開子窗口" onclick="openstr()" />
</label>
</form>
</body>
</html>
b.html
復(fù)制代碼 代碼如下:
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>b.html文檔</title>
<script type="text/javascript">
function ClickOk()
{
var t=document.Edit;
var color=t.color.value;
if(color==null||color=="填寫顏色") return(false);
var oOption = window.opener.document.createElement('OPTION');
oOption.text=url;
oOption.value=url;
//檢查瀏覽器類型
var bname = navigator.appName;
if (bname.search(/netscape/i) == 0)
{
window.opener.document.getElementById("txtselect").appendChild(oOption);
}
else if (bname.search(/microsoft/i) == 0)
{
window.opener.document.all.txtselect.add(oOption);
}
else
{
}
window.close();
}
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="2" align="center" width="300">
<form name="Edit" id="Edit">
<tr>
<td width="30" align="right" height="30">color:</td>
<td height="30"><input type="text" name="color" value="填寫顏色" /></td>
<td width="56" align="center" height="30"><input " type="button" name="bntOk" value="確認(rèn)" onclick="ClickOk();" /> </td>
</tr>
</form>
</table>
</body>
</html>
您可能感興趣的文章:
- js操作模態(tài)窗口及父子窗口間相互傳值示例
- JavaScript實(shí)現(xiàn)彈出子窗口并傳值給父窗口
- JavaScript新窗口與子窗口傳值詳解
- js創(chuàng)建子窗口并且回傳值示例代碼
- JAVASCRIPT實(shí)現(xiàn)的WEB頁(yè)面跳轉(zhuǎn)以及頁(yè)面間傳值方法
- JS父頁(yè)面與子頁(yè)面相互傳值方法
- JS中Iframe之間傳值及子頁(yè)面與父頁(yè)面應(yīng)用
- JavaScript實(shí)現(xiàn)在頁(yè)面間傳值的方法
- javascript彈出頁(yè)面回傳值的方法
- JS簡(jiǎn)單實(shí)現(xiàn)父子窗口傳值功能示例【未使用iframe框架】
相關(guān)文章
30分鐘快速實(shí)現(xiàn)小程序語(yǔ)音識(shí)別功能
最近需要在小程序上實(shí)現(xiàn)語(yǔ)音識(shí)別,將需要用到的功能都總結(jié)下,供大家參考。語(yǔ)音識(shí)別用的是科大訊飛,文中給出了詳細(xì)的實(shí)現(xiàn)方法介紹,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2018-11-11JS實(shí)現(xiàn)可移動(dòng)模態(tài)框
這篇文章主要為大家詳細(xì)介紹了JS實(shí)現(xiàn)可移動(dòng)模態(tài)框,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-07-07使用Turn.js實(shí)現(xiàn)翻書效果的完整步驟
最近項(xiàng)目經(jīng)理我個(gè)項(xiàng)目練練手,其項(xiàng)目需求是要實(shí)現(xiàn)翻書效果,下面這篇文章主要給大家介紹了關(guān)于使用Turn.js實(shí)現(xiàn)翻書效果的相關(guān)資料,文中通過(guò)代碼介紹的非常詳細(xì),需要的朋友可以參考下2023-12-12JavaScript表單驗(yàn)證實(shí)現(xiàn)代碼
這篇文章主要為大家詳細(xì)介紹了JavaScript表單驗(yàn)證的實(shí)現(xiàn)代碼,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-05-05JS變量中有var定義和無(wú)var定義的區(qū)別以及es6中l(wèi)et命令和const命令
這篇文章主要介紹了JS變量中有var定義和無(wú)var定義的區(qū)別以及es6中l(wèi)et命令和const命令,需要的朋友可以參考下2017-02-02微信小程序--onShareAppMessage分享參數(shù)用處(頁(yè)面分享)
本篇文章主要介紹了微信小程序的頁(yè)面分享onShareAppMessage分享參數(shù)用處的相關(guān)資料。具有很好的參考價(jià)值。下面跟著小編一起來(lái)看下吧2017-04-04JS實(shí)現(xiàn)頁(yè)面跳轉(zhuǎn)鏈接的幾種方式匯總
這篇文章主要介紹了JS實(shí)現(xiàn)頁(yè)面跳轉(zhuǎn)鏈接的幾種方式,簡(jiǎn)單總結(jié)了幾種頁(yè)面跳轉(zhuǎn)功能的實(shí)現(xiàn),有使用js跳轉(zhuǎn)頁(yè)面,返回上一次預(yù)覽界面及button按鈕添加事件跳轉(zhuǎn),本文結(jié)合實(shí)例代碼給大家介紹的非常詳細(xì),需要的朋友參考下吧2024-01-01ECMAScript6函數(shù)默認(rèn)參數(shù)
這篇文章主要介紹了ECMAScript6函數(shù)默認(rèn)參數(shù)的相關(guān)資料,需要的朋友可以參考下2015-06-06