In the hyperlink tag a, is there the attribute mon? Solve_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:22:33
Original
1292 people have browsed it

In Baidu’s news page, I saw that the mon attribute is used in many hyperlinks


Reply to discussion (solution)

None, but The html tag attribute can be added arbitrarily, so this attribute is legal, but has no style effect or functional effect, but can be obtained by js

a itself does not have the mon attribute
This should be Baidu Let’s use a customized function internally

In Baidu’s news page, I saw that many hyperlinks use the mon attribute

If there is no such attribute, I add it myself.

provided for JS calls for other purposes. It is not a standard attribute, but you can define it for your own use. It is generally used to store some data or something. It can be operated with JS
jquery can easily obtain it using attr.
http://www.ostools.net/apidocs/apidoc?api=jquery

This is Google Images, which uses a lot of data-src, data-sz, etc.

You can add custom attributes to the html tag at will, but the consequence is that your web page is no longer standard! If you use easyui, you will find that easyui uses non-standard custom attributes

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template