//HTML
<asp:TextBox runat="server" ID="TextBox1" onmouseover="removeAllAttrs_onmsover();" onmouseout="ADDAllAttrs_onmsout();"></asp:TextBox>
//SCRIPT
function removeAllAttrs_ onmsover() {
var element =
document.body;
for (var i =
element.attributes.length; i-- > 0; )
element.removeAttributeNode(element.attributes[i]);
}
function ADDAllAttrs_ onmsout(element) {
var body =
document.getElementsByTagName('body')[0];
body.setAttribute("oncopy", "return
false;");
body.setAttribute("onpaste", "return
false;");
body.setAttribute("oncut", "return
false;");
}
No comments:
Post a Comment