Files
eruda/test/index.html
2016-05-20 20:46:48 +08:00

68 lines
2.2 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Eruda</title>
<link rel="stylesheet" href="style.css">
<script src="../dist/eruda.js"></script>
<script>eruda.init();</script>
</head>
<body>
<div id="test-element" class="border" style="color:red">
<div class="child-one">One</div>
<div class="child-two">Two</div>
<a href="https://github.com/liriliri/eruda">GitHub</a>
<div class="child-three" style="height: 500px">
This is a very long text!
This is a very long text!
This is a very long text!
This is a very long text!
This is a very long text!
</div>
<div class="fixed-footer">This is a footer!</div>
<div>
<img src="http://7xn2zy.com1.z0.glb.clouddn.com/blog_elf.jpg">
</div>
<button>Test</button>
<script>
document.body.addEventListener('click', function ()
{
console.log('test');
}, false);
var test = document.getElementById('test-element');
test.addEventListener('click', function ()
{
console.log('test2');
}, false);
test.addEventListener('click', function ()
{
console.log('This is something really really cool!!!!! Laaaaaaaaaa!!!!!!!!!!!!!!!');
}, true);
test.addEventListener('touchstart', function ()
{
console.log('test3');
}, false);
function req(url)
{
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.send();
}
setTimeout(function ()
{
req('http://localhost:3000/test/style.css');
}, 1000);
setTimeout(function ()
{
req('http://localhost:3000/test/data.json');
}, 2000);
setTimeout(function ()
{
req('http://localhost:3000/test/empty.json');
}, 3000);
</script>
</div>
</body>
</html>