天天看點

showModalDialog使用詳解(IE4+ 支援)

showModalDialog:是一種模式視窗,當使用它打開子視窗,後面的父視窗的活動将停止,除非該模式子視窗關閉,才可操作父視窗。

使用方法:vReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])

sURL -- 必選參數,類型:字元串。用來指定對話框要顯示的文檔的URL。

vArguments -- 可選參數,類型:變體。用來向對話框傳遞參數。傳遞的參數類型不限,包括數數組等。對話框通過window.dialogArguments來取得傳遞進來的參數。 sFeatures -- 可選參數,類型:字元串。用來描述對話框的外觀等資訊,可以使用以下的一個或幾個,用分号“;”隔開。

<a href="#" target="_blank" rel="external nofollow"

         onClick="javascript:window.showModalDialog('asrs/pub/special/messageContext.jsp?messageId=<%=tasrsMessageList.get(i).getId()%>','','toolbar=1,location=0,directories=0,width=500, height=300')"><%=tasrsMessageList.get(i).getTitle()%></a>

繼續閱讀