js code
//在页面增加一个放置图标的区块
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的更多相关文章
- 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 ...
- 与你相遇好幸运,The Moe Node.js Code Style Guide
The Moe Node.js Code Style Guide By 一个最萌的开发者 @2016.9.21 >>代码是人来阅读的,格式规范的代码是对编程人员最好的礼物 :) > ...
- js code review
js code review https://codereview.stackexchange.com/ refs xgqfrms 2012-2020 www.cnblogs.com 发布文章使用:只 ...
- Inject js code to exchange 2013
1. save the following code to C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa ...
- rsa && sha1 js code
jsbn.js /* * Copyright (c) 2003-2005 Tom Wu * All Rights Reserved. * * Permission is hereby granted, ...
- JS Code Snippet --- Cookie
<a id="quitBtn" href="#" class="exit">Exit</a> <a id=&q ...
- -_-#【Better JS Code】严格模式
要在整个脚本中启用严格模式,可以在顶部添加如下代码: "use strict"; 这行代码看起来像是字符串,而且也没有赋值给任何变量,但其实它是一个编译指示,用于告诉支持的 Jav ...
- -_-#【Better JS Code】插入迭代值
+function() { var i = 0 var values = ['xiaoming', 'xiaohong'] var name = values[i] i++ console.log(n ...
- 【Knockout.js 学习体验之旅】(2)花式捆绑
本文是[Knockout.js 学习体验之旅]系列文章的第2篇,所有demo均基于目前knockout.js的最新版本(3.4.0).小茄才识有限,文中若有不当之处,还望大家指出. 目录: [Knoc ...
随机推荐
- 自学Java第一周的总结
在第一周里我花费了不少时间配置jdk的环境变量,并学习了有关java的基本知识,了解了Java中的变量.数据类型以及运算符.我知道了什么是变量并且如何去定义变量,也学会了如何去使用运算符以及对数据类型 ...
- Hadoop学习笔记之五:HDFS功能逻辑(1)
Block Report DataNode会周期性(默认1小时)将自身节点全部block信息发送给NameNode,以让NameNode正确确维护block信息. 在Block Report的数据源D ...
- centos7.2 开机启动脚本
vim ~/.bashrc 然后最后一行添加 source /etc/profile 一.添加开机自启服务 在CentOS 7中添加开机自启服务非常方便,只需要两条命令(以Jenkins为例):sys ...
- 在虚拟机上安装gho、esd(wim)系统镜像文件
gho.esd(wim)等文件不能被虚拟机识别,但如果把它们打包成iso就可以了. 另外,还需用到能在虚拟机上运行的WinPE的iso文件,本文用的是微PE. 注意:安装虚拟机提示operating ...
- Spring Boot 2 (三):Spring Boot 2 相关开源软件
Spring Boot 2 (三):Spring Boot 2 相关开源软件 一.awesome-spring-boot Spring Boot 中文索引,这是一个专门收集 Spring Boot 相 ...
- mysql主从(主备)同步一键配置,配自动检测功能
主从一键shell配置 做个笔记. #!/bin/bash #Mysql sync #chenglee #master机器ip MasterIP="192.168.137.174" ...
- 一图解释PHPstorm代码片段设置---附官方文档(转)
参考:https://blog.csdn.net/thinkthewill/article/details/81145106 资料 设置片段[官方设置教程] 设置变量对话框[官方设置教程] phpst ...
- (12网络化部署深化下)自己动手,编写神经网络程序,解决Mnist问题,并网络化部署
网络化部署一直是我非常想做的,现在已经基本看到了门路.今天早上实验,发现在手机上的支持也非常好(对于相机的支持还差一点),证明B/S结构的框架是非常有生命力的.下一步就是要将这个过程深化.总结,并且封 ...
- undefined reference to `vtable for MyColor'
MyColor是新建的类,原因是使用了QObject,但是系统没有反应过来 解决:从工程删除,再添加进去[QtCreator]
- centos6.8防火墙模块未加载
使用阿里云服务器下的centos6.8系统,开启或关系或查询防火墙的状态时,提示防火墙模块未加载. 解决办法: modprobe ip_tables #加载ip_tables模块 modprobe i ...