//在页面增加一个放置图标的区块
if(!document.getElementById('_span_jiucuo'))
document.write("<span id='_span_jiucuo'></span>"); //获取放置图标的区块
var span_msg = document.getElementById("_span_jiucuo"); //获取站点标识码
var sitecode = document.getElementById("_jiucuo_").attributes["sitecode"].value;
//生成纠错图标及点击链接
span_msg.innerHTML = "< img onclick=\"Link('" + sitecode + "')\" style='margin:0;border:0;cursor: pointer;' src='http://121.43.68.40/exposure/images/jiucuo.png?v="+sitecode+"'/>"; //点击图标
function Link(site_code) {
//获取该站点需要纠错页面的url地址
var url = getCurrUrl();
//跳转至纠错系统填写页面
window.open("http://121.43.68.40/exposure/jiucuo.html?site_code=" + site_code + "&url=" + encodeURIComponent(url));
}
//获取该站点需要纠错页面的url地址
function getCurrUrl() {
var url = "";
if (parent !== window) {
try {
url = window.top.location.href;
} catch (e) {
url = window.top.document.referrer;
}
}
if (url.length == )
url = document.location.href; return url;
}

js code的更多相关文章

  1. ES6 will change the way you write JS code.

    https://hacks.mozilla.org/2015/04/es6-in-depth-an-introduction/ Counting to 6 The previous editions ...

  2. 与你相遇好幸运,The Moe Node.js Code Style Guide

    The Moe Node.js Code Style Guide  By 一个最萌的开发者 @2016.9.21 >>代码是人来阅读的,格式规范的代码是对编程人员最好的礼物 :) > ...

  3. js code review

    js code review https://codereview.stackexchange.com/ refs xgqfrms 2012-2020 www.cnblogs.com 发布文章使用:只 ...

  4. Inject js code to exchange 2013

    1. save the following code to C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa ...

  5. rsa && sha1 js code

    jsbn.js /* * Copyright (c) 2003-2005 Tom Wu * All Rights Reserved. * * Permission is hereby granted, ...

  6. JS Code Snippet --- Cookie

    <a id="quitBtn" href="#" class="exit">Exit</a> <a id=&q ...

  7. -_-#【Better JS Code】严格模式

    要在整个脚本中启用严格模式,可以在顶部添加如下代码: "use strict"; 这行代码看起来像是字符串,而且也没有赋值给任何变量,但其实它是一个编译指示,用于告诉支持的 Jav ...

  8. -_-#【Better JS Code】插入迭代值

    +function() { var i = 0 var values = ['xiaoming', 'xiaohong'] var name = values[i] i++ console.log(n ...

  9. 【Knockout.js 学习体验之旅】(2)花式捆绑

    本文是[Knockout.js 学习体验之旅]系列文章的第2篇,所有demo均基于目前knockout.js的最新版本(3.4.0).小茄才识有限,文中若有不当之处,还望大家指出. 目录: [Knoc ...

随机推荐

  1. socket.io不为人知的功能

    socket.io 是一个基于websocket实现的前后端实时通讯框架,也对低版本浏览器做了封装.使用起来简单,方便. 初次使用起来可能会比较迷糊,其实主要常用就几个方法,简单介绍一下. //客户端 ...

  2. P1216 数字金字塔

    P1216  数字金字塔 我们可以用 f [ i ] [ j ] 表示从(1,1)出发,到达(i,j)的最大权值和. (i , j)可以由(i - 1 , j)或者(i - 1 , j - 1)转化来 ...

  3. The Little Prince-12/07

    The Little Prince-12/07 "My little man, where do you come from? What is this ‘where I live,‘ of ...

  4. B/S开发介绍

    b/s 的优势: 1.开发成本低 2.管理维护简单 3.产品升级便利 4.对用户的培训费用低 5.用户使用方便,出现故障的概率小 b/s 的不足: 1.安全性不足 2.客户端不能随心变化,受浏览器限制

  5. 安装使用zookeeper

    1,加压 2,复制zoo_sample.cfg命名为zoo.cfg 3,在conf同级目录下新建一文件夹 data 4,修改数据存放目录 5,启动zookeeper

  6. linux下的ifconfig命令

    ifconfig工具不仅可以被用来简单地获取网络接口配置信息,还可以修改这些配置. 1.命令格式: ifconfig [网络设备] [参数] 2.命令功能: ifconfig 命令用来查看和配置网络设 ...

  7. 2019/3/26 wen 数组

  8. Python cv2 OpenCV 中传统图片格式与 base64 转换

    Base64是网络上最常见的用于传输8Bit字节码的编码方式之一,是一种基于64个可打印字符来表示二进制数据的方法.通过http传输图片常常将图片数据转换成base64之后再进行传输. Base64简 ...

  9. innobackup stream 压缩备份,解压后的qp文件

    是用innobackup stream 压缩备份,解压后很多文件还是qp格式的压缩文件,需要再解压. 备份: [root@ ~]# /usr/bin/innobackupex --defaults-f ...

  10. Linux查看机器和硬盘的SN

    查看硬件RAID中某块硬盘SN # sas 口: [root@ ~]$ smartctl -a /dev/sda -d megaraid,n *** Serial number: 6RJ974SR * ...