国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
html能彈出消息框嗎?
ASP.NET中能彈出消息框嗎?
就是在應(yīng)用程序中使用MessageBox等彈出來(lái)的消息框!
不知道可以做到不,可以的話,該如何實(shí)現(xiàn)?
______________________________________________________________________________________________
答1:
Response.Write("<script language=‘javascript‘>alert(‘hello!‘)</script>");
______________________________________________________________________________________________
答2:
Javascript有許多內(nèi)建的方法來(lái)產(chǎn)生對(duì)話框,如:window.alert(), window.confirm(),window.prompt().等。 然而IE提供更多的方法支持對(duì)話框。如:showModalDialog() (IE 4+ 支持)
   
    test1.htm
====================
   <script>
 var mxh1 = new Array("mxh","net_lover","孟子E章")
 var mxh2 = window.open("about:blank","window_mxh")
 // 向?qū)υ捒騻鬟f數(shù)組
 window.showModalDialog("test2.htm",mxh1)
 // 向?qū)υ捒騻鬟fwindow對(duì)象
 window.showModalDialog("test3.htm",mxh2)
   </script>
    test2.htm
====================
    <script>
 var a = window.dialogArguments
 alert("您傳遞的參數(shù)為:" + a)
   </script>
   test3.htm
====================
   <script>
 var a = window.dialogArguments
 alert("您傳遞的參數(shù)為window對(duì)象,名稱:" + a.name)
   </script>
   可以通過(guò)window.returnValue向打開(kāi)對(duì)話框的窗口返回信息,當(dāng)然也可以是對(duì)象。例如:
    test4.htm
===================
    <script>
 var a = window.showModalDialog("test5.htm")
 for(i=0;i<a.length;i++) alert(a[i])
    </script>
    test5.htm
===================
    <script>
       function sendTo()
       {
 var a=new Array("a","b")
 window.returnValue = a
 window.close()
        }
    </script>
    <body>
 <form>
 <input value="返回" type=button onclick="sendTo()">
 </form>
 常見(jiàn)問(wèn)題:
 1,如何在模態(tài)對(duì)話框中進(jìn)行提交而不新開(kāi)窗口?
 如果你 的 瀏覽器是IE5.5+,可以在對(duì)話框中使用帶name屬性的iframe,提交時(shí)可以制定target為該iframe的name。對(duì)于IE4+,你可以用高度為0的frame來(lái)作:例子,
 test6.htm
 ===================
 <script>
  window.showModalDialog("test7.htm")
 </script>
 test7.htm
 ===================
 if(window.location.search) alert(window.location.search)
 <frameset rows="0,*">
  <frame src="about:blank">
  <frame src="test8.htm">
 </frameset>
 test8.htm
 ===================
 <form target="_self" method="get">
 <input name=txt value="test">
 <input type=submit>
 </form>
 <script>
 if(window.location.search) alert(window.location.search)
 </script>
 2,可以通過(guò)http://servername/virtualdirname/test.htm?name=mxh方式直接向?qū)υ捒騻鬟f參數(shù)嗎?
 答案是不能。但在frame里是可以的。
______________________________________________________________________________________________
答3:
使用我的WebMessageBox控件,下載地址:
http://www.aspxcontrol.com
______________________________________________________________________________________________
答4:
if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
   {   
    e.Item.Cells[7].Attributes["onclick"]="return confirm(‘確認(rèn)這條記錄刪除?‘);";
   }
______________________________________________________________________________________________
答5:
if(MessageBox.Show( 要顯示的話,"標(biāo)題",MessageBoxButtons.YesNo,MessageBoxIcon.Information,MessageBoxDefaultButton.Button1,MessageBoxOptions.ServiceNotification )==DialogResult.Yes)
{
//確認(rèn)處理后要執(zhí)行的代碼
}
______________________________________________________________________________________________
答6:
記得引用:
using System.Windows.Forms;
______________________________________________________________________________________________
答7:
ubc(做程序員“挺”好!)
在asp.net中能添加system.windows.forms這個(gè)命名空間嗎?
______________________________________________________________________________________________
答8:
解決方案(右邊)有個(gè)引用,右擊添加引用
System.Windows.Forms.dll
之后才可以使用
using System.Windows.Forms;
之后就可以按 ubc(做程序員“挺”好!) 說(shuō)的那樣使用MessageBox.Show啦

______________________________________________________________________________________________
答9:
JScript.Net同樣與javascript一樣的功能,還能實(shí)現(xiàn)如下:
window.showModelDialog("yourhtm.htm","center=yes,toolbar=no,status=no")且可以:
window.showModellessDialog(...同上)的功能,實(shí)現(xiàn)自定義對(duì)話框,
具體請(qǐng)參閱微軟的相關(guān)幫助。
______________________________________________________________________________________________
答10:
http://lucky_elove.www1.dotnetplayground.com/
______________________________________________________________________________________________
答11:
http://lucky_elove.www1.dotnetplayground.com/ShowList.aspx?id=1
http://lucky_elove.www1.dotnetplayground.com/ShowDetail.aspx?id=9EEAFE96-3393-4228-A19C-C85A1456D104
______________________________________________________________________________________________
答12:
Response.Write("<script language=‘javascript‘>alert(‘hello!‘)</script>");
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
js彈出對(duì)話框
CSDN技術(shù)中心 showModalDialog()、showModelessDialog()方法使用詳解
js showModalDialog參數(shù)傳遞
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服