如何显示在asp.net中弹出 [英] how to show pop up in asp.net

查看:94
本文介绍了如何显示在asp.net中弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想每5分钟显示一次弹出窗口.如何创建和显示弹出窗口..
例如 http://www.magicbricks.com/ [ ^ ]

i want to show pop up after every 5 minutes.how can i create and show popup..
like http://www.magicbricks.com/[^]

推荐答案



根据您的要求尝试一下

Hi,

try this for your requirement

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script language ="javascript" >
        var tmp;
        function f1() {
         
            document.getElementById("popupdiv").style.display = '';
            tmp = setTimeout("f2()", 1000);
        }
        function f2() {
           
            document.getElementById("popupdiv").style.display = 'none';
            tmp = setTimeout("f1()", 2000);
        }
    </script>
</head>
<body onload="f1()">
    <form id="form1" runat="server">
    <div>
      <div id="popupdiv" style="removed:fixed; removed0px; removed0px; background-color:Red; width :100%;">
       This is popup <br />
      </div>
    </div>
    </form>
</body>
</html>



并对其进行修改以满足您的确切要求

最好的



And modify it to achieve exact your requirement

All the Best


要使用 Window.Open> 方法弹出,可以在以下位置找到一些不错的资源:
1. http://www.tizag.com/javascriptT/javascriptpopups.php
2. http://www.javascript-coder.com/window-popup/javascript- window-open.phtml

您还可以根据需要使用一些在线弹出生成器为弹出窗口生成代码:
1. http://javascript.internet.com/generators/popup-window.html
2. http://www.javascriptkit.com/popwin/index.shtml

对于某些提供更多功能的定制弹出窗口,您可以参考
1. 高度框 [高度框 [ ^ ]
3. 灰盒 [ ^ ]

这些链接通过示例说明了自定义弹出窗口的用法.

希望这会有所帮助.
一切顺利.
For pop up using Window.Open> method you can find some good resources at :
1. http://www.tizag.com/javascriptT/javascriptpopups.php
2. http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

You can also generate the code for your pop up depending on the requirements using some online Pop up Generators :
1. http://javascript.internet.com/generators/popup-window.html
2. http://www.javascriptkit.com/popwin/index.shtml

For some customised pop ups which provide more functionality you can refer to
1. Leightbox[^]
2. Lighbox[^]
3. Greybox[^]

These links explain the use of customised pop ups with example.

Hope this helps.
All the best.


使用ModalPopupExtender.

模式弹出窗口扩展程序基础 [使用AJAX ModalPopupExtender登录/注册屏幕 [ http://csharpdotnetfreak.blogspot.com/2011/03/ajax-modalpopupextender-example- aspnet.html [ ^ ]

http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/modalpopup/modalpopup.aspx [ ^ ]

或者,如果您想要一个宽敞的窗口,请使用window.open打开一个新的网页.

希望对您有帮助.

〜Amol
use ModalPopupExtender.

Modal Popup Extender Basics[^]

Login/SignUp Screen Using AJAX ModalPopupExtender[^]

http://csharpdotnetfreak.blogspot.com/2011/03/ajax-modalpopupextender-example-aspnet.html[^]

http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/modalpopup/modalpopup.aspx[^]

Or if you want a somple window then use window.open to open a new web page.

Hope this will help you.

~Amol


这篇关于如何显示在asp.net中弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆