Home > Web Front-end > HTML Tutorial > cnzz code adds elements to page_html/css_WEB-ITnose

cnzz code adds elements to page_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:52:51
Original
1876 people have browsed it

After registering an account on cnzz first, he will give you the following code:

<span style="font-size:18px;"><script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_xxxxxxxxxx'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s19.cnzz.com/z_stat.php%3Fid%3D1252929438%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script></span>
Copy after login
The meaning of this js code is,

The variable cnzz_protocol is defined according to the transmission protocol used by the current page. If it is the https protocol, then cnzz_protocol="https://", otherwise it is="http://".

The document.write() command simply prints the specified text content to the page.

The unescape() function decodes a string encoded by escape(). Webmaster Tools, I decoded it here, you can Baidu "unescape decoding", there are many online decoding tools.


Decoded by the unescape() function, we can get:

<span style="font-size:18px;">"<span id='cnzz_stat_icon_1252929438'></span><script src='" + cnzz_protocol + "s19.cnzz.com/z_stat.php?id=xxxxxxxxxx&show=pic1' type='text/javascript'></script>"</span>
Copy after login
He created a span element and added a script.


After this script is executed, the page becomes the following

<span style="font-size:18px;"><span id="cnzz_stat_icon_1252929438">    <a href="http://www.cnzz.com/stat/website.php?web_id=xxxxxxxxxx" target="_blank" title="站长统计">        <img src="http://icon.cnzz.com/img/pic1.gif" border="0" hspace="0" vspace="0">    </a></span></span>
Copy after login
<span style="font-size:18px;"><script src="http://s19.cnzz.com/z_stat.php?id=xxxxxxxxxx&show=pic1" type="text/javascript"></script></span>
Copy after login
<span style="font-size:18px;"><script src="http://c.cnzz.com/core.php?web_id=xxxxxxxxxx&show=pic1&t=z" charset="utf-8" type="text/javascript"></script></span>
Copy after login

Regarding the principle of traffic statistics, you can refer to this article: A brief analysis of the principle of CNZZ website traffic statistics

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