简体   繁体   English

如何使用 w3c 验证器 API

[英]How to use the w3c validator API

W3C has an API for their html validator (see http://validator.w3.org/docs/api.html ). W3C 为他们的 html 验证器提供了一个 API(参见http://validator.w3.org/docs/api.html )。 But I am confused as to how it is used.但我对它的使用方式感到困惑。 I would like to be able to call this as Ajax in jquery and have the information from the validator passed back to me in a variable.我希望能够在 jquery 中将其称为 Ajax,并将来自验证器的信息以变量的形式传回给我。

How can I go about doing this?我该怎么做呢?

Thanks谢谢

Maybe this is a possible update:也许这是一个可能的更新:

In previous answers and comments only a SOAP API was mentioned, which is however, as described here , outdated.在之前的答案和评论中,只提到了 SOAP API,但是,正如此处所述,它已经过时了。

A possibility to use the new(?) API is described here : 此处描述使用 new(?) API 的可能性:

https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.w3.org%2F&out=json

Maybe someone can confirm this.也许有人可以证实这一点。

Unfortunately, you have to set up a proxy to do this due the cross-domain restriction.不幸的是,由于跨域限制,您必须设置代理才能执行此操作。

How to call SOAP WS from Javascript/jQuery 如何从 Javascript/jQuery 调用 SOAP WS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM