您可以从中复制数据的警报 [英] Alert from which you can copy data

查看:82
本文介绍了您可以从中复制数据的警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个Web应用程序,写在asp.net上,我想在其中添加一个确认对话框,从中我可以从中复制一些数据,就像那些Windows异常(那些异常)一样. 发送" \不发送"警报),您可以在其中打开详细信息,也可以从那里复制详细信息.

该对话框不一定必须带有更多详细信息"按钮,我只应该能够从对话框中复制一些数据而不能对其进行编辑.

谢谢

Hi,

I have a web application, written on asp.net, in which I''d like to add a confirm dialog box from which I''ll be able to copy some of the data, same way when you have those Windows exceptions (those "Send" \ "Don''t Send" alerts) where you can open the details and you can copy the details from there.

The dialog box should not be necessarily with this "More Details" button, I just should be able to copy some of the data from the dialog and not be able to edit it.

Thanks

推荐答案

对于呈现消息的方式,我建议使用jQuery模态框.请参阅此教程:
http://www.jacklmoore.com/notes/jquery-modal-tutorial [ ^ ].

由于所有呈现的数据都是您的modal对象已知的,因此您可以收集它们并将其用于使用Ajax提交问题信息.为此,您可以添加诸如提交问题信息"之类的按钮.您可以为此使用jQuery Ajax方法:
http://api.jquery.com/category/ajax/ [ http://www.steamdev.com/zclip/ [ http://archive.plugins.jquery.com/project/clipboard [ http://www.deluxeblogtips.com/2010/06/javascript-copy-to-剪贴板.html [^ ].

—SA
For a way of presenting the message, I would recommend jQuery modal box. Please see this tutorial:
http://www.jacklmoore.com/notes/jquery-modal-tutorial[^].

As all presented data is known to your modal object, you can collect it and use to submit the issue information using Ajax. For this purpose, you can add a button like "Submit Issue Information" or something like that. You can use jQuery Ajax method(s) for this purpose:
http://api.jquery.com/category/ajax/[^].

If you can write data to the client''s clipboard, you can easily find appropriate plug-in code. Such as those:
http://www.steamdev.com/zclip/[^],
http://archive.plugins.jquery.com/project/clipboard[^].

This article provides some overview on using the client''s clipboard:
http://www.deluxeblogtips.com/2010/06/javascript-copy-to-clipboard.html[^].

—SA


按Ctrl + A.警报/确认框中的消息将被复制到剪贴板(但在确认/警报框中不会被选中").

然后打开记事本或任何文本编辑应用程序,然后按Ctrl +V.

如果您不相信此技巧,请先自己尝试..
Press Ctrl + A . The message in the alert/confirm box will be copied to clipboard ( but will not be seen ''selected'' on the confirm/alert box).

Then open notepad or any text editing application and press Ctrl + V.

If you don''t believe this trick , then try it yourself first..


这篇关于您可以从中复制数据的警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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