如何在Ajax Html编辑器扩展器中禁用粘贴? [英] how to disable paste in Ajax Html editor extender?

查看:84
本文介绍了如何在Ajax Html编辑器扩展器中禁用粘贴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用带有Ajax html编辑器扩展器的Asp文本框。我的问题是我不想允许将从其他来源复制的内容粘贴到我的文本框中。当我点击输入(对于下一行)时,在我的文本框中,它在我的数据库中存储为Div标记,如何解决这两个问题。请让我知道解决方案。

Hi,

I am using Asp text box with Ajax html editor extender. My issue is i don't want to allow to paste the content which is copied from some other source into my text box. And also in my text box when i am clicking the enter(for next line) it is stored as Div tag in my data base how to resolve these two issues. Please let me know the solutions.

推荐答案

在你的aspx中



In your aspx

<asp:textbox id="TextBox1" runat="server" onpaste="return false" xmlns:asp="#unknown"></asp:textbox> 







或Javascript






or in Javascript


document )。ready( function (){
(document).ready(function () {


' input.disablecopy粘贴')。bind(' copy paste'功能(e){
e.preventDefault();
});
});
('input.disablecopypaste').bind('copy paste', function (e) { e.preventDefault(); }); });


这篇关于如何在Ajax Html编辑器扩展器中禁用粘贴?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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