Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>tab switch</title>
- <meta name="author" content="morpe">
- <!-- Date: 2011-01-23 -->
- <style type="text/css">
- #mio_gif{
- text-align: center;
- width:250px;
- height: 250px;
- margin: auto auto;
- </style>
- <script type="text/javascript" >
- /*
- var fufu = true;
- numero = 0;
- immagini = new Array(19);
- nomi = new Array();
- for( i=1; i<immagini.length; i++)
- {
- immagini[i] = "banner/c"+i+".gif";
- }
- for (i=1; i<immagini.length; i++)
- {
- nomi[i] = "mia_img"+i;
- }
- for (i=1; i<immagini.length; i++)
- {
- nomi[i] = new Image();
- nomi[i].src = immagini[i];
- }
- function scorri(){
- numero++;
- if(numero == 19)numero = 1;
- document.satan.src = nomi[numero].src;
- setTimeout("scorri()",1500);
- document.getElementById("mostra_nome").innerHTML = immagini[numero];
- //alert("funzione scorri()");
- }
- function scambia(){
- var controlla = document.satan.src;
- if(controlla == nomi[1].src){
- document.satan.src = nomi[2].src;
- }
- else{
- document.satan.src = nomi[1].src;
- }
- }
- function ferma(){
- fufu = false;
- document.getElementById("play_stop").innerHTML = '<a href="#" onclick="ferma();">riparti</a>';
- }
- function calcola()
- {
- num1 = document.f1.t1.value;
- num2 = document.f1.t2.value;
- num3 = document.f1.t3.value;
- potenza = Math.pow(num1, num2)
- document.getElementById("risultato").innerHTML = num1 * num2;
- //alert(potenza);
- //numero = 321,1473333;
- //alert("round: "+Math.round(numero))
- //alert("floor: "+Math.floor(numero))
- //alert("ceil: "+Math.ceil(numero))
- }
- */
- function mia_str()
- {
- var indirizzo ="nixon@nwo.com";
- var mostra = indirizzo.indexOf("@");
- alert("indexOf: "+mostra);
- var nome_str = indirizzo.substring(0, mostra);
- alert("substring: "+nome_str+" l'user");
- var nome_str2 = indirizzo.substr(mostra +1, mostra);
- alert("substr: "+nome_str2+" il server");
- var carattere = indirizzo.charAt(mostra);
- alert("charAt: "+carattere);
- var codiceAsci = indirizzo.charCodeAt(mostra);
- alert("codice asci: "+codiceAsci);
- }
- </script>
- </head>
- <body onload="mia_str()">
- <!--
- <div id="mio_gif">
- onload="javascript: //scorri();"
- <div id="mostra_nome"><h1>huuuuuuuuu!!</h1></div>
- <div id="play_stop">
- <a href="#" onclick="ferma();">ferma</a>
- </div>
- <img src="banner/c5.gif" name="satan" width="100%" border="0" alt="banner" title="animation"/><br>
- </div>
- -->
- <div id="calcolatrice">
- <form name="f1">
- <!-- <input type="text" name="t1" value="0.45"><br>
- <input type="text" name="t2" value="3.14"><br>
- <input type="text" name="t3" value="10">round<br> -->
- <span id="risultato">risultato</span><br>
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement