How the list of Imperial CMS displays the number of clicks in real time
This article is about how Imperial CMS's list shows the number of clicks in real time. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
Imperial CMS list shows the number of clicks in real time
1. Browse: [!-- onclick--]
2. Add Jquery code
_ window.onload = function () {$('.clicknum') .each (function (I) {/ / all the news clicks in the list var url= "[!-- news.url--] eUniplicationViewClickbacks downloads Nojsstores 1 classidy =" + $(this) .attr ("data-class") + "& id=" + $(this) .attr ("data-id"); $(this) .load (url);});}
3. Modify the end of / e/public/ViewClick/index.php
$nojs= (int) $_ GET ['nojs']; / Parameter judgment output mode 1 = Direct output digital 0=JS output if ($nojs==1) {echo $shownum;} else {echo "[xss_clean] ('. $shownum."); thank you for reading! This is the end of the list of Imperial CMS on how to display the number of clicks in real time. I hope the above content can be helpful to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.