Skip to content

Instantly share code, notes, and snippets.

@droid242
Created October 9, 2012 19:22
Show Gist options
  • Save droid242/3860859 to your computer and use it in GitHub Desktop.
Save droid242/3860859 to your computer and use it in GitHub Desktop.
URL betöltése iframe-ba
<!DOCTYPE html>
<html lang="hu">
<head>
<title>bla-bla-bla</title>
<meta charset="utf-8" />
<style type="text/css">
#content {
font-family: "Helvetica Neue","Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
font-size: 1em;
margin-left: auto;
margin-right: auto;
width: 80%;
margin-top: 1em;
}
body {
margin: 0;
padding: 0;
}
#overlay {
position: absolute;
top: 15%;
left: 10%;
}
#site {
min-height: 99%;
width: 100%;
}
</style>
<script src="jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#content').show();
$('#overlay').hide();
$('#site').hide();
if(weboldal != null) {
$('#site').attr('src', weboldal).show();
$('#overlay').show();
$('#content').hide();
weboldal = null;
}
});
$('form').submit(function(){
var cim = $('input').val();
$('#site').attr('src', 'http://'+cim).show();
$('#overlay').show();
$('#content').hide();
});
</script>
</head>
<body>
<iframe id="site" src="" border="0" noborder="noborder" frameborder="0" padding="0" spacing="0" style="display: none;"></iframe>
<div id="overlay" style="display: none;"><img src="kep.png"></div>
<div id="content" style="display: none;">
<h1>qweqweqwe</h1>
<p>
qweqweqweqwewqewqewqewqewqewqewqewqewqewqewqeqwewqewqeqwewqewqewqeqweq
</p>
<p>
<form>
<input type="text" />
<input type="submit" value="mehet" />
</form>
</p>
<p>
<a href="javascript:var weboldal=location.href;location.replace('http://localhost:8080/qwe/');">bookmarklet</a>
</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment