我使用JavaScript警報語句創建消息對話框。該對話框包含一個按鈕。在那個按鈕中點擊我想關閉當前窗口。關閉窗口按鈕單擊使用javascript
的JavaScript
<script language="javascript" >
function Confirmation() {
var win = window.open('', '_self');
if (confirm("Are you sure you want to close the form?") == true)
win.close();
else
return false
}
</script>
HTML
<td class="style5">
<asp:ImageButton ID="close" runat ="server" ImageUrl ="image/button_blue_close.png" OnClientClick="return Confirmation()"
Height="16px" Width="21px" ImageAlign="Right"/>
</td>
當我點擊圖像按鈕,我的代碼只關閉窗口。但我想關閉該窗口的對話框
my code in vb.net
-----------------
ClientScript.RegisterStartupScript(Me.GetType(), "message", "alert('Please Raise the ticket for particular event');", True)
哦,這是ASP .. –
你可以用'alert()'包含代碼嗎?或者你的意思是確認()你有嗎?你的問題很混亂。 – bhamlin
si編輯我的code.pls見 – vps