Q
彈出警告消息
0
A
回答
1
一種方式可能是
1)創建像一個彈出
2格)顯示彈出當某些事件發生時(如點擊按鈕)
3)如果用戶單擊確定,然後做服務器端出頭
4),如果用戶點擊不那麼喜de the div
這裏有一些代碼,對不起,如果有一些錯誤,但我沒有我的手上的環境。
<head>
<script type="text/javascript">
function showConfirm()
{
var popup = document.getElementbyId('popup');
popup.style.display = '';
}
function hide()
{
var popup = document.getElementbyId('popup');
popup.style.display = 'none';
}
</script>
</head>
<body>
<form runat="server" id="form1">
<div id="popup" style="display:none">
<p>bla bla bla</p>
<asp:button id="btn_ok" runat="server" OnClick="ServerRountine_Click"/>
<asp:button id="btn_ko" runat="server" onclientclick="hide();"/>
</div>
<asp:button id="btn_overwrite" runat="server" onclientclick="showConfirm();"/>
</form>
</body>
0
你可以試試:
jConfirm(message, [title, callback])
http://abeautifulsite.net/blog/2008/12/jquery-alert-dialogs/
+0
什麼是去使用telerik的jQuery的點,它也有確認框 – Xinus
0
你可以把一個OnCl您ICK(或的OnClientClick如果它是一個服務器端控件)事件提交按鈕,如下所示:
<input type="button" value="Submit new file" onclick="if(confirm('Are you sure you want to overwrite this file?')) return false;" />
0
我prolly使用這個ASP modalpopup,P ...但是,是的,你想用AJAX做等 我想你會愛上JQ-UI即可。
它幾乎與上面相同,但它會在樣式同時彈出,P
$("#modEdit").dialog({//modEdit is your Div with any controls.
autoOpen: false,//Properties
width: 600,
show: "fade",
hide: "fade",
modal: true,
buttons: {//Buttons
"Save Changes": function() {
ModSaveChanges();
$(this).dialog("close");
},
Cancel: function() {
$(this).dialog("close");
}
}
});
語法看起來在短期是這樣$(控制).dialog({屬性,按鈕:{ BTN1,BTN2}});等
真的很容易,我真的建議更換它^^:d 我已經用了我的移動應用,P
哦,你也可以再看看到煎茶內線,P
相關問題
- 1. 彈出警告消息asp.net
- 2. 彈出警告消息
- 3. 警告消息/彈出日期/時間
- 4. 警告消息
- 5. 彈出警告
- 6. file_put_contents - 警告消息
- 7. ADBannerView警告消息
- 8. R2WinBUGS - 警告消息
- 9. 如何彈出「蜂窩數據已關閉」警告消息?
- 10. 在JavaScript彈出警告消息中排除特定網址
- 11. 在asp.net中點擊複選框顯示彈出警告消息
- 12. 彈出警告框
- 13. 彈出警報或消息給用戶
- 14. 提示時出現警告消息
- 15. 採購.vimrc時出現警告消息
- 16. 從c#彈出彈出警報消息頁
- 17. 彈出消息
- 18. iOS:CIColorKernel applyWithExtent警告消息
- 19. quantmod覆蓋警告消息
- 20. NServiceBus回覆消息警告
- 21. 捕獲警告消息
- 22. C#登錄消息警告
- 23. CodeIgniter形式警告消息?
- 24. 編譯器警告消息
- 25. 抑制gfortran警告消息
- 26. 警告消息Foundation 6
- 27. 警告消息更新
- 28. 警告消息scikit學習
- 29. 解決munmap警告消息
- 30. Django形式警告消息
你想什麼在服務器端的控制?因爲你有ajax工具包,你不能使用javascript'confirm'並通過ajax把控制權交給服務器端? – Xinus
沒有嘗試過,不喜歡它 – user710502
你是什麼意思,控制它在服務器端?該頁面將在客戶端上運行,您要控制哪一方面? –