Cerca
Sponsor

Iphone reindirizzamento

14 febbraio 2010

if (navigator.userAgent.match (/ iPhone / i)) (
/ / Redirect iPhone?
)

Generare un ID univoco

14 febbraio 2010

funzione uniqeid ()
(
NewDate var = new Date;
ritorno newDate.getTime ();
)

Data odierna

30 settembre 2009

<! - Copia questo codice nella sezione body ->

<SCRIPT LANGUAGE="JavaScript1.2">

<! - Begin
mese var = new Array (13);
mesi [1] = "gennaio";
mesi [2] = "febbraio";
mesi [3] = "marzo";
mesi [4] = "Aprile";
mesi [5] = "maggio";
mesi [6] = "Giugno";
mesi [7] = "luglio";
mesi [8] = "agosto";
mesi [9] = "Settembre";
mesi [10] = "ottobre";
mesi [11] = "novembre";
mesi [12] = "dicembre";
tempo var = new Date ();
var mesi lmonth = [time.getMonth () + 1];
var data = time.getDate ();
var anni = time.getYear ();
if (anno <2000)
anno + anno = 1900;
document.write ("<center>" + + lmonth "");
document.write (data + "," "<+ anno + / center>");
/ / End ->
</ SCRIPT>
</ CENTER>

Area Calculator

30 settembre 2009

<! - Incolla questo nella testa del documento HTML ->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<! - Original: Michael Hundt (mchundt@nglic.com) ->
<! - Sito Web: http://www.cinet.net/ mhundt ~ / mystuff.htm ->

<! >
<! >

<! - Begin
funzione doArea (num) (
switch (num) (
case 0: (""); ritorno break;
Caso 1: lunghezza var = prompt ("Inserire la lunghezza del quadrato:", "");
lunghezza = lunghezza lunghezza *;
ritorno (lunghezza); break;
Caso 2: larghezza var = prompt ("Inserire la larghezza della base:", "");
var altezza = prompt ("Inserisci l'altezza del triangolo:", "");
return (larghezza * altezza / 2); break;
Caso 3: var width = prompt ("Inserire la larghezza del rettangolo:", "");
var altezza = prompt ("Inserisci l'altezza del rettangolo:", "");
return (larghezza * altezza); break;
Caso 4: Raggio di var = prompt ("Inserire il raggio del cerchio:", "");
return (Math.PI * Math.pow (raggio, 2)); break;
Caso 5: raggio var = prompt ("Inserire il radious della sfera:", 0);
di ritorno (4 * * Math.PI (Math.pow (raggio, 2))); break;
)
)
/ / End ->
</ Script>
</ HEAD>

<! - Copia questo nel corpo del documento HTML ->

<center>
name=calcarea> <form
Trova l'area di un
size="1" <select name="shape" onChange="this.form.area.value = doArea(this.selectedIndex);">
<opzione> ...
<option value="square"> Square
<option value="triangle"> Triangle
<option value="rectangle"> Rettangolo
<option value="circle"> Circle
<option value="sphere"> Sphere
</ Select>
= <input Type=text size=10> name=area
</ Form>
</ Center>

Temperature Conversion

24 Settembre 2009
  code into the BODY of your HTML document --> 1: <! - STEP ONE: Copia questo codice nel corpo del documento HTML -> 
  2: 
  either field, then click outside the text box. 3: Inserire un numero in uno campo, quindi fare clic all'esterno della casella di testo. 
  4: 
  5: <form> 
  6: F: 
  name= "F" value= "32" 7: tipo di input <= "nome di testo" = "valore F" = "32" 
  ><br> 8: onChange = "C.value = 100 / (212-32) * (- this.value 32)"> <br> 
  9: C: 
 name= "C" value= "0" 10: tipo di input <= "nome di testo" = "C" value = "0" 
  ><br> 11: onChange = "F.value = (212-32) / 100 * this.value + 32"> <br> 
  12: </ form> 
Tradurre