如何在asp.net中自定义javascript / jquery弹出窗口 [英] How to customize the javascript/jquery popups in asp .net

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

问题描述

嗨亲爱的..





任何人都可以告诉我如何使用jquery或javascript在asp.net中自定义弹出窗口通过提供必要的颜色和定制的按钮...







谢谢大家....

Hi Dear all..


could any one please tell me how to customise popups in asp .net using jquery or javascript by giving necessary colours and customized buttons...



Thank you all....

推荐答案

请参阅我对该问题的评论。首先,这与ASP.NET无关。



然后,颜色通常是用CSS自定义的,如果元素被创建并不重要通过jQuery或不;你可以随时将任何CSS类添加到任何HTML元素。



然后,查看jQuery Dialog的源代码和一些弹出窗口:

http://plugins.jquery.com/tag/popup [ ^ ],

https://jqueryui.com/dialog [ ^ ],

http://api.jquerymobile.com/popup [ ^ ]。



最后两个案例例如,您将看到Dialog / Popup的内容只是一些< div> 元素。无论你想要什么,你都可以在这个元素中放置任何内部HTML。怎么比这更定制?



-SA
Please see my comment to the question. First of all, this is unrelated to ASP.NET.

Then, the colors are normally customized with CSS, and it doesn't really matter if the elements are created by jQuery or not; you can always add any CSS class to any HTML element.

And then, look at the source code of jQuery Dialog and some of pop-ups:
http://plugins.jquery.com/tag/popup[^],
https://jqueryui.com/dialog[^],
http://api.jquerymobile.com/popup[^].

In last two cases, for example, you will see that the content of the Dialog/Popup is just some <div> element. You can put any inner HTML in this element, whatever you want. How it can be more custom than that?

—SA


浏览器中的标准弹出窗口使用 alert JavaScript函数创建。这种弹出窗口无法自定义!

您可以选择两种:

1.使用HTLM5对话框标签,但今天它只支持Chrome和Safari

2.使用弹出窗口占用第三方JavaScript小部件库。正如你提到的jQuery,你可能应该选择jQuery UI
Standard popup windows in browsers are created using the alert JavaScript function. This kind of popup window CAN NOT be customized!
You can chose between two:
1. Use HTLM5 dialog tag, but as today it's only supported in Chrome an Safari
2. Take up a 3rd party JavaScript widget library with popup in it. As you mentioned jQuery you probably should pick jQuery UI


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

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