Created
January 19, 2012 13:37
-
-
Save genee19/1640076 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title> - jsFiddle demo</title> | |
<script type='text/javascript' src='/js/lib/mootools-core-1.4.2-full-nocompat.js'></script> | |
<link rel="stylesheet" type="text/css" href="/css/normalize.css"> | |
<link rel="stylesheet" type="text/css" href="/css/result-light.css"> | |
<style type='text/css'> | |
#target { | |
visibility: hidden; | |
} | |
</style> | |
<script type='text/javascript'>//<![CDATA[ | |
window.addEvent('load', function() { | |
var $, typ; | |
document.cookie = "test=This cookie came from the outer source"; | |
$ = function(id) { | |
return document.getElementById(id); | |
}; | |
typ = $('thankyou'); | |
typ.addEventListener('click', function() { | |
var affcode, child, target, _i, _len, _ref; | |
affcode = $('affcode'); | |
target = $('target').contentWindow.document; | |
target.write(affcode.value); | |
return false; | |
}); | |
});//]]> | |
</script> | |
</head> | |
<body> | |
<p><legend>Your affiliate code:<br> | |
<textarea id="affcode" rows=10 cols="40"> | |
<script>alert("hi"); | |
document.write('<hr>'); | |
alert(document.cookie) | |
</script> </textarea></legend></p> | |
<a href="#" id="thankyou">Click here to "reach" the "Thank you…" page</a>. | |
<iframe id="target"></iframe> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment