Avviare lo standard , testo semplice editor di testo sul vostro computer . 
 
 2 
 Inserisci il seguente codice nell'editor di testo : 
 
  
 
 < tipo style = "text /css " > < - 
 
 # esterno { 
 
 background-color : yellow ; 
 
 } 
 
 # interiore language = "javascript " > 
 
 funzione changeDiv ( ) { 
 
 document.getElementById ( " interno " ) style.width = " 400px " ; . 
 
 document.getElementById ( " interno " ) style.height = " 400px " ; . 
 
document.getElementById ( " interno " ) style.fontSize = " 62px " ; .
 
 document.getElementById ( " interiore " . ) style.textAlign = "center" ; stile 
 
 document.getElementById ( " interno " ) ; 
 
 document.getElementById ( " interno " ) = style.backgroundColor " # FFB3B3 " . . . color = "black " ; . 
 
 document.getElementById ( " interno " ) innerHTML = " javascript possono modificare molte proprietà di un Div " ; 
 
 } 
 
 < /script> 
 
 < /head> 
 
 < /body> 
 
 < /html > 
 3 
 Fare clic su " File ", "Salva ". Salvare con il nome di file " test.html . " 
 4 
 Avviare il browser . Fare clic su " File ", "Apri file ". 
 5 
 Individuare il file " test.html " si è creato. Fare clic su "Apri ". 
 6 
 Clicca sul testo all'interno del fondo blu con il mouse per cambiare i margini del box . 
 
              
Programmazione © www.354353.com