Darmowe Forum
Kwiecień 19, 2024, 18:48:21 *
Witamy, Gość. Zaloguj się lub zarejestruj.
Czy dotarł do Ciebie email aktywacyjny?

Zaloguj się podając nazwę użytkownika, hasło i długość sesji
Aktualności: Forum zostało uruchomione!
 
   Strona główna   Pomoc Zaloguj się Rejestracja  
Strony: [1]
  Drukuj  
Autor Wątek: Tabliczka mnożenia w JS  (Przeczytany 3153 razy)
admin
Administrator
Ekspert
*****
Wiadomości: 821


Email
« : Marzec 05, 2018, 12:46:54 »

Skrypt HTML
<html>
<head>
<link href="format1.css" type="text/css" rel="stylesheet">
<script type="text/javascript" SRC = "AC_10_tab_while.js"></script>
</head>

<div id="duze_pudlo" >Duze pudlo

<div id="naglowek1"> WITAJ DOBRY

</div>
<div id="naglowek2">w naszym Swiecie
<script></script>
</div>
<div id="lewus">Lewus
<script>
tabelka();
</script>
</div>
<div id="srodek">
<script>


</script>

</div>
<div id="prawus">
<script>

</script>
</div>
</div>
<div id="stopka">Wszelkie prawa do strony ma Misiek</div>
</div>
</body>
</html>





PLik JavaScript o nazwie AC_10_tab_while.js

 
function tabelka(){
var kolor_pola;
document.write("<table border='1px'>");
for(var x = 1; x < 6; x++) {
document.write("<tr style='height:30px;'>");
for(var y = 1; y<6; y++)
{if(x == 1 || y == 1) {kolor_pola = "#bbbbbb";}
else {kolor_pola = "#aaf0aa";}
document.write("<td style='width:30px; background-color:" +kolor_pola + "'>" + x*y + "</td>");
}document.write("</tr>");
}
document.write("</table>");}

--------------------------------CSS i nazwie format1.css ----------------------------------------------------------------------
body {font-family:arial;
font-size:40px;
background-color:lime}
#duze_pudlo {
width:1000px;
min-height:600px;
margin:auto;
background-color:#FFFFFF}
#naglowek1 {
width:1000px;
min-height:50px;
font-size:50;
margin:auto;
background-color:yellow}
#pole {
    width: 360px;
    height: 360px;
    position: relative;
    background: yellow;
}
#kwadrat {
    width: 20px;
    height: 20px;
    position: absolute;
    background: red;
}
#naglowek2 {
font-family:Verdana;
width:1000px;
min-height:50px;
font-size:30;
margin:auto;
background-color:#10dd90}
#lewus {
font-family:Verdana;
float:left;
width:200px;
min-height:550px;
font-size:30;
margin:auto;
background-color:#DD11ff}
#prawus{
font-family:Verdana;
float:left;
width:400px;
min-height:550px;
font-size:30;
margin:auto;
background-color:#006000}
#srodek{
font-family:Verdana;
float:left;
width:400px;
min-height:550px;
font-size:30;
margin:auto;
background-color:#FF1122}
#stopka{
font-family:Verdana;
width:1000px;
min-height:50px;
font-size:30;
margin:auto;
background-color:#FFAA10}








« Ostatnia zmiana: Marzec 12, 2018, 10:23:30 wysłane przez admin » Zapisane
Strony: [1]
  Drukuj  
 
Skocz do:  

Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC | Sitemap

Polityka cookies
Darmowe Fora | Darmowe Forum

zostangwiazda mixblackcity yourlifetoday bross- th