Home >Web Front-end >JS Tutorial >Some websites allow js cracking code for anti-hotlink images of blank referer_javascript skills

Some websites allow js cracking code for anti-hotlink images of blank referer_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:06:551268browse

Javascript source code:

Copy code The code is as follows:

function showImg( url ) {
var imgid = Math.random(),
frameid = 'frameimg' imgid;
window['img' imgid] = 'window.onload = function() { parent.document.getElementById('' frameid '').height = document.getElementById('img').height 'px'; }<' '/script> ';
document.write('');
}

Call method:
Copy code The code is as follows:

showImg('image address');

Full demo code:

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn