项目编号:CYCG##########项目名称:########################分包名称:########################采购人: ### 采购代理机构: ### 采购方式: ### Copyright ? ####- ### All Rights Reserved.
地址:青岛市市南区福州南路##,##号 技术支持电话:####-############-########
### 安备 ##############号ICP:鲁ICP备########号
技术支持: ###
//用户点击文章或是课程的详情页,点击量加#function addclick(type, flag) {var cookieName = type + "jia" + flag;//组合独一无二的专属该文章的cookie名var jsonString = { "type": type, "flag": flag };var cookie = getCookie(cookieName);if (cookie == null || cookie == "") {//如果没有这个cookie,则说明是第一次点击该页面,或者已经过去了##分钟,可以给点击量+#了$.ajax({type: "post",url: "../../PortalQDManage/PortalQD/SaveUVCount",data: jsonString,async: true,success: function (msg) {var date = new Date();date.setTime(date.getTime() + ## * ## * ####);//只能这么写,##表示##分钟setCookie(cookieName, cookieName, { expires: date });//点击量成功加#,则打印信息//console.log(msg);},error: function (XMLHttpRequest, textStatus, errorThrown) {//console.log("连接超时!");}});}};function setCookie(c_name, value, expiredays) {var exdate = new Date()exdate.setDate(exdate.getDate() + expiredays)document.cookie = c_name + "=" + escape(value) +((expiredays == null) ? "" : ";expires=" + exdate.toGMTString())}function getCookie(c_name) {if (document.cookie.length > #) {c_start = document.cookie.indexOf(c_name + "=")if (c_start != -#) {c_start = c_start + c_name.length + #c_end = document.cookie.indexOf(";", c_start)if (c_end == -#) c_end = document.cookie.lengthreturn unescape(document.cookie.substring(c_start, c_end))}}return ""}
查看剩余内容>>