Начало
Разное
Плавник монеты
Когда у Вас нет монеты, используйте этот быстрый и легкий действительный щелкающий монетой подлинник.
The two necessary coin images
for this script are included
in this ZIP file.
coins.zip
JavaScript Miscellaneous: Плавник монеты
<!-- TWO STEPS TO INSTALL COIN FLIPPER: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin function flipCoin() { var x = parseInt(Math.random() * 2, 10); coinsrc = (!x) ? "heads.gif" : "tails.gif"; document.coinform.coinbutton.value = 'Flipping'; ID = window.setTimeout("changeCoin();", 750); } function changeCoin() { document['coin'].src = coinsrc; document.coinform.coinbutton.value = 'Flip Coin'; } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <center> <form name=coinform> <table border=0 height=200> <tr valign=top> <td><input type=button name=coinbutton value="Flip Coin" onClick="flipCoin();"></td> <td><img name=coin src="heads.gif" width=190 height=190></td> </tr> </table> </form> </center> <!-- Script Size: 1.29 KB -->