Tabfun: Difference between revisions
(Created page with "<source lang="html4strict"> <!DOCTYPE html> <html> <head> <title>HELP</title> <style> span { background: blue; color: purple; } div{ display: inline-block; } body{backg...") |
No edit summary |
||
Line 1: | Line 1: | ||
[http://lucasbattich.tumblr.com/eliza.html link] | |||
<source lang="html4strict"> | <source lang="html4strict"> | ||
<!DOCTYPE html> | <!DOCTYPE html> | ||
Line 37: | Line 39: | ||
</script> | |||
</body> | |||
</html> | |||
</source> | |||
another version (with lucas' help) (you are welcome) | |||
<source lang="html4strict"> | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<title>HELP</title> | |||
<style> | |||
span { | |||
background: blue; | |||
color: purple; | |||
} | |||
div{ | |||
display: inline-block; | |||
} | |||
body{background: #CCCCFF; | |||
transition: background 0.5s linear;} | |||
button { | |||
color: red; | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
<button id="but" onclick="tabs()" type="button" style="position:absolute;">more fun</button> | |||
<script> | |||
var x = document.getElementById("but"); | |||
setInterval(function(){timer()},2000); | |||
//window.addEventListener("beforeunload", tabs(event)); | |||
function timer() | |||
{ | |||
x.style.top=Math.floor(Math.random()*101)+"%"; | |||
x.style.left=Math.floor(Math.random()*101)+"%"; | |||
x.style.top=Math.floor(Math.random()*101)+"%"; | |||
x.style.left=Math.floor(Math.random()*101)+"%"; | |||
x.innerHTML="even more fun"; | |||
} | |||
function tabs(event) { | |||
timer(); | |||
for (i = 0; i < 1; i++) { | |||
var ntab=window.open("HELP.html"); | |||
//ntab.document.write("more fun"); | |||
} | |||
} | |||
</script> | </script> | ||
</body> | </body> |
Revision as of 18:24, 6 October 2014
<!DOCTYPE html>
<html>
<head>
<title>HELP</title>
<style>
span {
background: blue;
color: purple;
}
div{
display: inline-block;
}
body{background: #CCCCFF;
transition: background 0.5s linear;}
</style>
</head>
<body>
<script>
window.addEventListener("beforeunload", function( event ) {
for (i = 0; i < 2; i++) {
var ntab=window.open("HELP.html");
//ntab.document.write("more fun");
}
});
</script>
</body>
</html>
another version (with lucas' help) (you are welcome)
<!DOCTYPE html>
<html>
<head>
<title>HELP</title>
<style>
span {
background: blue;
color: purple;
}
div{
display: inline-block;
}
body{background: #CCCCFF;
transition: background 0.5s linear;}
button {
color: red;
}
</style>
</head>
<body>
<button id="but" onclick="tabs()" type="button" style="position:absolute;">more fun</button>
<script>
var x = document.getElementById("but");
setInterval(function(){timer()},2000);
//window.addEventListener("beforeunload", tabs(event));
function timer()
{
x.style.top=Math.floor(Math.random()*101)+"%";
x.style.left=Math.floor(Math.random()*101)+"%";
x.style.top=Math.floor(Math.random()*101)+"%";
x.style.left=Math.floor(Math.random()*101)+"%";
x.innerHTML="even more fun";
}
function tabs(event) {
timer();
for (i = 0; i < 1; i++) {
var ntab=window.open("HELP.html");
//ntab.document.write("more fun");
}
}
</script>
</body>
</html>