1<! DOCTYPE HTML Public "-//w3c//dtd XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD ">234<meta http-equiv= "content-type" content= "text/html; Charset=utf-8 "/>5<title> Untitled Document </title>6<style>7. DV {width:800px; height:600px; text-align:center;}8. TD2 {width:80px; height:30px; border:solid #CCC 1px; background: #F00; color: #FFF; text-align:center; position:relative;}9. dv1 {width:150px; height:150px; border:solid #0003px;}Ten . Dv2 {width:300px; height:250px; border:solid #CCC 20px; position:absolute; top:100px; left:460px; display:none; BAC Kground: #FFF;} one. td3 {width:30px; height:30px; border:solid #999 1px; text-align:center; color: #FFF;} a. td4 {width:30px; height:30px; border:solid #999 1px; text-align:center; color: #666; background: #CCC;} -. TD5 {width:60px; height:30px; border:solid #999 1px; text-align:center; color: #FFF; background: #009;} -. TB {padding-left:70px; padding-top:20px;} the</style> -<script> -Window.onload=function(){ - varTd1=document.getelementbyid ("td"); + varDv0=document.getelementbyid ("dva"); - varDv1=document.getelementbyid ("dvv"); + varDv2=document.getelementbyid ("dve"); a varColor1=document.getelementbyid ("c1"); at varColor2=document.getelementbyid ("c2"); - varColor3=document.getelementbyid ("c3"); - varWidth1=document.getelementbyid ("w1"); - varWidth2=document.getelementbyid ("w2"); - varWidth3=document.getelementbyid ("w3"); - varHeight1=document.getelementbyid ("h1"); in varHeight2=document.getelementbyid ("h2"); - varHeight3=document.getelementbyid ("h3"); to varRe=document.getelementbyid ("recover"); + varSu=document.getelementbyid ("sure"); - thetd1.onclick=function(){ *Dv2.style.display= ' Block '; $Dv0.style.background= ' #999999 ';Panax Notoginseng } - thecolor1.onclick=function(){ +Dv1.style.background= ' #F00 '; a } theColor1.onmouseover=function(){ +Color1.style.background= ' #F00 '; - } $color1.onmouseout=function(){ $Color1.style.background= ' #99CC66 '; - } - thecolor2.onclick=function(){ -Dv1.style.background= ' #FF0 ';Wuyi } theColor2.onmouseover=function(){ -Color2.style.background= ' #FF0 '; wu } -color2.onmouseout=function(){ aboutColor2.style.background= ' #CCCC00 '; $ } - -color3.onclick=function(){ -Dv1.style.background= ' #00F '; a } +Color3.onmouseover=function(){ theColor3.style.background= ' #00F '; - } $color3.onmouseout=function(){ theColor3.style.background= ' #3399CC '; the } the thewidth1.onclick=function(){ -Dv1.style.width= ' 200px '; in } theWidth1.onmouseover=function(){ theWidth1.style.background= ' #F90 '; about } thewidth1.onmouseout=function(){ theWidth1.style.background= ' #CCC '; the } + -width2.onclick=function(){ theDv1.style.width= ' 300px ';Bayi } theWidth2.onmouseover=function(){ theWidth2.style.background= ' #F90 '; - } -width2.onmouseout=function(){ theWidth2.style.background= ' #CCC '; the } the thewidth3.onclick=function(){ -Dv1.style.width= ' 400px '; the } theWidth3.onmouseover=function(){ theWidth3.style.background= ' #F90 ';94 } thewidth3.onmouseout=function(){ theWidth3.style.background= ' #CCC '; the }98 aboutheight1.onclick=function(){ -dv1.style.height= ' 200px ';101 }102Height1.onmouseover=function(){103Height1.style.background= ' #F90 ';104 } theheight1.onmouseout=function(){106Height1.style.background= ' #CCC ';107 }108 109height2.onclick=function(){ thedv1.style.height= ' 300px ';111 } theHeight2.onmouseover=function(){113Height2.style.background= ' #F90 '; the } theheight2.onmouseout=function(){ theHeight2.style.background= ' #CCC ';117 }118 119height3.onclick=function(){ -dv1.style.height= ' 400px ';121 }122Height3.onmouseover=function(){123Height3.style.background= ' #F90 ';124 } theheight3.onmouseout=function(){126Height3.style.background= ' #CCC ';127 } - 129re.onclick=function(){ theDv1.style.width= ' 150px ';131dv1.style.height= ' 150px '; theDv1.style.background= ' None ';133 }134 135su.onclick=function(){136Dv2.style.display= ' None ';137Dv0.style.background= ' None ';138 }139 } $</script>141142 143<body>144<div id= "dva" class= "dv" >145<table>146<tr>147<td>148<strong> Please set the style for the following div:</strong>149</td> max<TD id= "td" class= "td2" >151 Click Settings the</td>153</tr>154</table>155<div id= "dvv" class= "dv1" >156</div>157<div id= "dve" class= "dv2" >158<table cellspacing= "10px" >159<tr> the<td> Please select a background color:</td>161<TD id= "c1" class= "td3" bgcolor= "#99CC66" > Red </td>162<TD id= "c2" class= "td3" bgcolor= "#CCCC00" > Yellow </td>163<TD id= "c3" class= "td3" bgcolor= "#3399CC" > Blue </td>164</tr>165<tr>166<td> Please select width (px):</td>167<TD id= "w1" class= "td4" >200</td>168<TD id= "w2" class= "td4" >300</td>169<TD id= "w3" class= "td4" >400</td> the</tr>171<tr>172<td> Please select High (px):</td>173<TD id= "h1" class= "td4" >200</td>174<TD id= "h2" class= "td4" >300</td>175<TD id= "h3" class= "td4" >400</td>176</tr>177</table>178<table class= "tb" cellspacing= "10px" >179<tr> the<TD id= "recover" class= "td5" > Recovery </td>181<TD id= "sure" class= "td5" > OK </td>182</tr>183</table>184</div>185</div>186</body>187Warm -up Work
Learn the warm-up job of Java script