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
Release: 2016-05-16 18:06:55
Original
1271 people have browsed it

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:

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template