Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function podmiana()
- {
- var x= document.getElementById('obrazek');
- var obrazki =['jeden.jpg','dwa.jpg','trzy.jpg'];
- var y=Math.floor(Math.random()*3);
- document.getElementById('obrazek').src=obrazki[y];
- }
- setInterval(podmiana,10000);
- function data()
- {
- czas=new Date();
- document.getElementById('nicc').innerHTML=czas.getSeconds();
- }
- setInterval(data,100);
- /*
- document.write('<br>');
- document.write('<br>'); document.write('<br>');
- document.write('<br>');
- var zerojeden = [];
- i=0
- for ( x=100; i<x; i++) {
- zerojeden.push(Math.round(Math.random() * 1)) // math.round zaokrągla liczby
- }
- var licz = 0
- for (i=1;i<x; i++)
- {
- if (zerojeden[i] ==0)
- licz=licz+1;
- }
- document.write('ilość zer_'+licz);
- document.write('<br>');
- document.write('<br>');
- var jeden = 1
- for (i=1;i<zerojeden.length; i++)
- {
- if (zerojeden[i] ==1)
- jeden=jeden+1;
- }
- document.write('ilość jedynek_'+jeden);
- document.write('<br>');
- $(document.body).append('<br>')
- $(document.body).append(zerojeden)
- $(document.body).append('<br>')
- var arr = [];
- i=0
- for ( x=25; i<x; i++) {
- arr.push(Math.round(Math.random() * 10)) // Wypełnij tablicę 25 elementową wylosowanymi liczbami całkowitymi z zakresu 0 do 10
- } // array.push dodaje nowe zmienne do tablicy ( w tym przypadku losowe od 0 do 10)
- document.write(arr);
- $(document.body).append('<br>')
- function funkcja()
- {
- x=document.getElementById('login').value;
- polekola=(Math.PI*x)*2
- document.getElementById('nicc').innerHTML=polekola;
- //Wylosuj liczbę całkowitą z zakresu 2 do 12
- }
- document.write(Math.floor(Math.random()*10+2));
- document.write('<br>'):
- /*
- for (y=1 ; y<=10; y++){
- $(document.body).append('<br>');
- $(document.body).append(y+ '<h1>pierwszy napis h1</h1>'+'_');
- var x=y+y
- $(document.body).append(x+'<br>');}
- for (y=2 ; y<=20; y++){
- $(document.body).append('<br>');
- $(document.body).append(y+ '<h1>pierwszy napis h1</h1>'+'_');
- var x=y+y
- $(document.body).append(x+'<br>');}
- $('h1').hide('slow');
- $(document).ready
- $('h1').click(function(){
- $(this).hide();
- });
- */
- /*
- $(document.body).append('nictutajniema'); //dziala tak samo jak document.write
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement