HTML:onpaste =" doSomething();"作为无效属性 [英] HTML: onpaste="doSomething();" as invalid attribute

查看:132
本文介绍了HTML:onpaste =" doSomething();"作为无效属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Amaya检查我的HTML代码。



我在这行上有一个错误:

 < input style =vertical-align:bottom; type =textid =doi_idonkeydown =if(event.keyCode == 13)return false; onpaste = parsePIIfromDOI();/> 

而对于onpaste,我得到无效属性onpaste(保存时删除)错误。



我不知道为什么?非常感谢您的帮助。

解决方案

http://reference.sitepoint.com/html/extended-event-attributes/onpaste



Microsoft定义的用于Internet Explorer的非标准事件,可以在其他某些浏览器中使用,但无法可靠地使用,该非标准属性的兼容性未经测试。 b $ b $

I am checking my HTML code with Amaya.

I have an error on this line:

<input style="vertical-align:bottom;" type="text" id="doi_id" onkeydown="if (event.keyCode == 13) return false;" onpaste="parsePIIfromDOI();"/>

And for the onpaste, I am getting "Invalid attribute "onpaste"(removed when saving)" error.

I don't know why? Thank you very much for your help.

解决方案

http://reference.sitepoint.com/html/extended-event-attributes/onpaste

"Non-standard event defined by Microsoft for use in Internet Explorer. May work in some other browsers but cannot be reliably used. Compatibility for this non-standard attribute not tested."

这篇关于HTML:onpaste =&quot; doSomething();&quot;作为无效属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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