Skip to content

Instantly share code, notes, and snippets.

@chiral
Created June 7, 2013 11:15
Show Gist options
  • Select an option

  • Save chiral/5728593 to your computer and use it in GitHub Desktop.

Select an option

Save chiral/5728593 to your computer and use it in GitHub Desktop.
iframe clickjacking
<html>
<head>
<title>テスト</title>
<meta charset="UTF-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
</head>
<body>
<div class="mytest">
<iframe class="mytest1" style="position:absolute;left:0;top:0;" src="./sample.html" frameborder=0 width=510 height=400 scrolling=no></iframe>
<div class="mytest2" style="position:absolute;left:0;top:0;width:510px;height:400px;" frameborder=0 width=510 heigh\
t=400 scrolling=no></div>
</div>
<script type="text/javascript">
$('.mytest2').on('click', function(e){
console.log(e.screenX,e.screenY);
return false;
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment