源码里也没看到超链接目标的 URL 。
function format(tpl) {
var index = 1, items = arguments;
return (tpl || '').replace(/{(\w*)}/g, function(match, p1) {
return items[index++] || p1 || match;
});
}
function loadCSS(url, callback) {
return $('')
.attr({ href: url })
.on('load', callback)
.appendTo(document.head);
}
function lazyGist(element) {
var $btn = $(element);
var $self = $(element).parent();
var $link = $self.find('a');
$btn.prop('disabled', 'disabled').text('Loading...');
$.getJSON(format('{}.json?callback=?', $link.prop('href').replace($link.prop('hash'), '')))
.done(function(data) {
loadCSS(data.stylesheet, function() {
$self.replaceWith(data.div);
$('.gist .gist-file .gist-meta a').filter(function() { return this.href === $link.prop('href'); }).parents('.gist-file').siblings().remove();
});
})
.fail(function() { $self.replaceWith($('').attr('href', url).text(url)); });
}
源码里也没看到超链接目标的 URL 。
3
写代码之前先阅读一下相关法条,尤其是非法获取计算机信息系统数据罪和破坏计算机信息系统罪以及侵犯公民个人信息罪。
搜索下:addEventListener 或者 click
以前 markup language 除了给计算机看,也是可以给人看的