如何实现oncontextmenu =" return false;"通过W3C解析器? [英] how to implement oncontextmenu="return false;" to pass the W3C parser ?

查看:42
本文介绍了如何实现oncontextmenu =" return false;"通过W3C解析器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的所有页面都符合W3C验证器,除了这一行

如下所示。


我需要保留线路(或者功能很好)但是以一种能让我100%通过W3C的方式来实现它会很好。


任何想法?


谢谢。

第45行,第33栏:没有属性ONCONTEXTMENU


< body class = QUOT;身体QUOT; oncontextmenu =" return false;">


您在文档中使用了上面提到的属性,但是您使用的

文档类型确实如此不支持此

元素的属性。此错误通常是由于使用框架的文档错误地使用严格

文档类型引起的(例如,您必须使用

Transitional文档类型获得目标属性),或者使用供应商专有扩展(例如marginheight)来获得b&b属性。 (这是

通常通过使用CSS来实现所需的效果)。


如果<不支持元素本身,也可能导致此错误br />
您正在使用的文档类型,因为未定义的元素将没有

支持的属性;在这种情况下,请参阅元素未定义错误

消息以获取更多信息。


如何修复:检查元素和属性的拼写和大小写,

(记住XHTML都是小写的)和/或检查它们是否在所选文档类型中允许

,和/或使用CSS代替此

属性。

I have got all my pages to comply with the W3C validator, except this
one line as below.

I need to keep the line (or the functionalilty) but it would be nice
to implement it in a way that gives me a 100% pass with W3C.

Any ideas?

Thanks.
Line 45, column 33: there is no attribute "ONCONTEXTMENU"

<body class="body" oncontextmenu="return false;">

You have used the attribute named above in your document, but the
document type you are using does not support that attribute for this
element. This error is often caused by incorrect use of the "Strict"
document type with a document that uses frames (e.g. you must use the
"Transitional" document type to get the "target" attribute), or by
using vendor proprietary extensions such as "marginheight" (this is
usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in
the document type you are using, as an undefined element will have no
supported attributes; in this case, see the element-undefined error
message for further information.

How to fix: check the spelling and case of the element and attribute,
(Remember XHTML is all lower-case) and/or check that they are both
allowed in the chosen document type, and/or use CSS instead of this
attribute.

推荐答案

在comp.infosystems中。 www.authoring.html 我说:
In comp.infosystems.www.authoring.html me said:
我有我的所有页面




i know


在多个新闻组之间共享消息的可接受方式是什么?
http://smjg.port5.com/faqs/usenet/xpost.html


-

theoflittlevoices



i know

What is the accepted way to share a message across multiple newsgroups?
http://smjg.port5.com/faqs/usenet/xpost.html

--
t h e o f l i t t l e v o i c e s


m e写道:
me wrote:
我的所有页面都符合W3C验证器,除了这一行,如下所示。
I have got all my pages to comply with the W3C validator, except this
one line as below.



为什么你要瘫痪我的浏览器所以我不能使用上下文菜单,例如
,为你的网站添加书签?


你没有任何改变认为这个tomfoolery会阻止我

窃取你珍贵的HTML吗?


-

干杯

Richard。



Why do you want to cripple my browser so I can''t use the context menu to,
for instance, bookmark your site?

You don''t by any change think that this tomfoolery will prevent me from
stealing your precious HTML do you?

--
Cheers
Richard.


我写道:
我的所有页面都符合要求使用W3C验证器,除了这一行如下所示。

我需要保留一行(或功能),但以某种方式实现它会很好这给了我100%的W3C通行证。
< body class =" body" oncontextmenu =" return false;">
I have got all my pages to comply with the W3C validator, except this
one line as below.

I need to keep the line (or the functionalilty) but it would be nice
to implement it in a way that gives me a 100% pass with W3C. <body class="body" oncontextmenu="return false;">




使用Javascript的addEventListener函数将事件附加到

body元素。


-

Mark。
http://tranchant.plus.com/


这篇关于如何实现oncontextmenu =&quot; return false;&quot;通过W3C解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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