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 ...
随机推荐
- 怎样从外网访问内网Nginx?
本地安装了一个Nginx,只能在局域网内访问,怎样从外网也能访问到本地的Nginx呢?本文将介绍具体的实现步骤. 1. 准备工作 1.1 安装并启动Nginx 默认安装的Nginx端口是80. 实现步 ...
- Spring P命名空间 02
P命名空间 装配属性 使用<property> 元素为Bean 的属性装配值和引用并不太复杂.尽管如此,Spring 的命名空间p 提供了另一种Bean 属性的装配方式,该方式不需要配置如 ...
- Oracle初级第一天
oracle卸载 运行regedit,删除HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ ...
- 计算概论(A)/基础编程练习1(8题)/2:苹果和虫子
#include<stdio.h> #include<math.h> int main() { /* n个苹果 每x小时能吃掉一个苹果 经过y小时 */ float n, x, ...
- win10常见问题处理办法
1.当笔记本连接wifi时,提示,无internet,安全,而手机能正常连接wifi时: cmd(需管理员权限)执行命令 netsh winsock reset 出现已重置,重启电脑 解决方法 2.当 ...
- java jdbc->mycat->oracle SqlException异常中文信息乱码解决
mycat字符集gbk oracle字符集gbk 原jdbc连接串: base.jdbc.url=jdbc:mysql://127.0.0.1:3306/XXX?useUnicode=true& ...
- mybatis generator 生成中文注释
mybatis generator默认生成 的注释太奇葩了,完全不能拿到生产去用,不过幸亏提供了接口可以自己扩展.长话短说,要生成如下的domain, package com.demo.domain; ...
- Java中断异常 InterruptedException 的正确处理方式
你看到这篇文件可能是因为你已经调用了一个抛出 InterruptedException 异常的方法,并且需要以某种方式处理它. 首先,需要了解为一个方法为啥会 throws InterruptedEx ...
- git 随笔
还有一些git的指令没有用过,记录在这里. 1. 设置远程branch的指令 There is no tracking information for the current branch.Pleas ...
- Actions对Element的一些操作解析
针对Chrome浏览器: 在自动化测试的编写中如果报出Element is not visible to click at xxxx point时,我会使用: new Actions(WebDrive ...