#title { width: 500px; height: 75px; position: absolute; left: 20; top: 350; border: 1px solid black; font-size: 12px; } #chieflayer { width: 100%; height: 100%; position: absolute; left: 0px; top: 0px; background-color: white; visibility: hidden; } #anzeige { width: 500px; height: 20px; position: absolute; left: 20; top: 330; border: 1px solid black; background-color: black; color: white; font-size: 16px; font-weight: 700; text-align :center; } #feld { width: 500px; height: 300px; position: absolute; left: 20; top: 20; border: 1px solid green; } #p1 { width: 3px; height: 15px; position: absolute; left: 10px; top: 140px; background-color: red; } #p2 { width: 3px; height: 15px; position: absolute; left: 527px; top: 140px; background-color: blue; } #ball { width: 10px; height: 10px; position: absolute; left: 253px; top: 140px; font-size: 10px; text-align: center; } chief = 0; function init() { balldir = 'r'; ballv = 'd'; // myball = document.getElementById('ball'); ballx = 253; bally = 140; p1dir = 'stop'; p1y = 140; pp1 = 0; p2dir = 'stop'; p2y = 140; pp2 = 0; game = window.setInterval("move()",5); } function move() { if (balldir != 'stop') { if (balldir == 'r') { ballx += 3; if (ballx > 505) { balldir = 'l'; if (p2y > bally + 15 || p2y < bally - 10) { pp1 += 1; document.getElementById('pointsp1').innerHTML = pp1; } /* else { stop(); } */ } document.getElementById('ball').style.left = ballx; } else { ballx -= 3; if (ballx < 20) { balldir = 'r'; if (p1y > bally + 15 || p1y < bally - 10) { pp2 += 1; document.getElementById('pointsp2').innerHTML = pp2; } } document.getElementById('ball').style.left = ballx; } if (ballv == 'd') { bally += 3; if (bally > 305) {ballv = 'u';} document.getElementById('ball').style.top = bally; } else { bally -= 3; if (bally < 20) {ballv = 'd';} document.getElementById('ball').style.top = bally; } } if (p1dir != 'stop') { if (p1dir == 'up' && p1y <= 300) { p1y += 3; document.getElementById('p1').style.top = p1y; document.getElementById('out').innerHTML = p1y; } if (p1dir == 'down' && p1y >= 20) { p1y -= 3; document.getElementById('p1').style.top = p1y; document.getElementById('out').innerHTML = p1y; } } if (p2dir != 'stop') { if (p2dir == 'up' && p2y <= 300) { p2y += 3; document.getElementById('p2').style.top = p2y; } if (p2dir == 'down' && p2y >= 20) { p2y -= 3; document.getElementById('p2').style.top = p2y; } } } function stop() { window.clearInterval(game); } function chiefcomes() { { chief += 1; if (chief % 2 == 1) { document.getElementById('chieflayer').style.visibility = 'visible'; document.title = 'Google-Suche: Javascript'; } else { document.getElementById('chieflayer').style.visibility = 'hidden'; document.title = 'TT'; } } } script for="document" event="onkeydown()" language="JScript" type="text/jscript" { if (window.event.keyCode == 89) {p1dir = 'up';} if (window.event.keyCode == 83) {p1dir = 'down';} if (window.event.keyCode == 98) {p2dir = 'up';} if (window.event.keyCode == 104) {p2dir = 'down';} if (window.event.keyCode == 27) {chiefcomes();} // alert (window.event.keyCode); } /script script for="document" event="onkeyup()" language="JScript" type="text/jscript" { if (window.event.keyCode == 89) {p1dir = 'stop';} if (window.event.keyCode == 83) {p1dir = 'stop';} if (window.event.keyCode == 98) {p2dir = 'stop';} if (window.event.keyCode == 104) {p2dir = 'stop';} } /script
|
Web | Ergebnisse 1 - 10 von ungefähr 42.100.000 für Javascript. (0,10 Sekunden) |
Anzeigen | |||
Webmaster-Forum Fragen zu HTML, JavaScript, PHP, Design, Domains, Website-Promotion? www.forum.de.ki | |||
Sehen Sie Ihre Anzeige hier... |
JavaScript Source: Free JavaScripts, Tutorials, Example Code ... - [ Diese Seite übersetzen ]
The JavaScript Source is your resource for thousands of free JavaScripts for cutting
and pasting into your Web pages. ... Latest Additons to The JavaScript Source. ...
javascript.internet.com/ - 55k - 11. Nov. 2004 - |
JavaScript.com (TM) - The Definitive JavaScript Resource ... - [ Diese Seite übersetzen ]
JavaScript.com is your source for all things JavaScript, including tutorials, free
java scripts, downloads, tools, javascript source code and other scripting ...
www.javascript.com/ - 43k - 11. Nov. 2004 - |
Kakao & Kekse - Demnächst noch Schokoladiger!
HTML Datenbank kostenlosHTML database free Perl JavaScript Portal PHP kostenlosPerl
JavaScript Portal PHP kostenlos ... Das JavaScript-Forum ist nun wieder aktiv! ...
javascript.seite.net/ - 5k - 11. Nov. 2004 - |
JavaScript Kit- Comprehensive JavaScript, DHTML, CSS tutorials and ... - [ Diese Seite übersetzen ]
Comprehensive JavaScript tutorials and over 400 free scripts. Just added a complete
JavaScript Reference. ... JavaScript Kit Formerly Website Abstraction, ...
javascriptkit.com/ - 33k - 11. Nov. 2004 - |
JavaScript/DOM. Sinnvolle Vorkenntnisse zum Verständnis: HTML und die
einführenden Bemerkungen zu JavaScript. Dieser Abschnitt ...
de.selfhtml.org/javascript/ - 6k - |
JavaScript - Einführung, Programmierung und Referenz Stefan Koch 3. Auflage. ... Diverse
Beispiele zu JavaScript bzw. JScript. Neues über diese Web-Seite. ...
www.dpunkt.de/javascript/ - 4k - |
JavaScript City - [ Diese Seite übersetzen ]
... Related Site. JavaScript Search Search for JavaScripts, tutorials, FAQ's, tips,
and much more. A guide to free scripts, tutorials, and resources. ...
www.javascriptcity.com/ - 8k - |
JavaScript Tutorial - [ Diese Seite übersetzen ]
HTML,CSS,JavaScript,DHTML,XML,XHTML,ASP,ADO and VBScript tutorial from W3Schools. ...
JavaScript Tutorial. previous next JavaScript Tutorial. ...
www.w3schools.com/js/default.asp - 22k - 11. Nov. 2004 - |
Teach-Soft: Unterrichtsmaterial für Informatik ...
Aktiv im Bereich E-Learning seit 1993! News. LISY & Virtual Classroom.
Unsere Unterrichtsmaterialien werden seit 1993 erfolgreich ...
www.ksl.mediendesign.eduhi.at/ts/ - 5k - |
JavaScript Search - [ Diese Seite übersetzen ]
JavaScript Search is your source for hundreds of free JavaScripts and JavaScript
related information, including scripts, tutorials, FAQ's, tips, and much more. ...
www.javascriptsearch.com/ - 86k - |
In den Ergebnissen suchen | Sprachtools | Suchtipps |