Fandt denne her kode, men kan satme ikke få den til at virke.
- <?xml version="1.0" encoding="iso-88559-1"?>
- <!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3c.org/TR/xhtmll-transitional.dtd">
- <html>
- <head>
- <title> Earth Quake</title>
- <script language="javaScript" type="text/javascript">
- <!--
- function Quake(time)
- {
- if (self.moveBy)
- {
- for (var side = 25; side > 0; side=side-1)
- {
- for (var tmp = time; tmp > 0; tmp=tmp-1)
- {
- self.moveBy(0,side);
- self.moveBy(side,0);
- self.moveBy(0,-side);
- self.moveBy(-side,0);
- }
- }
- }
- }
- //-->
- </script>
- </head>
- <body>
- <form><input type="button" value="Simulate Earthquake"onclick="Quake(20)";/></form>
- </body>
- </html>
Meningen er at den skal simulere et jordskælv.
Indlæg senest redigeret d. 05.08.2009 15:53 af Bruger #15047