javascript清除内容

View Code
 1 <script type="text/javascript">

 2         function cleartext() {

 3             for (i = 0; i < window.document.forms[0].elements.length; i++) {

 4                 if (window.document.forms[0].elements[i].type == "text") {

 5                     window.document.forms[0].elements[i].value = "";

 6                 }

 7             }

 8             document.getElementById("<%= contactdescription.ClientID %>").value = "";

 9         }

10     </script>

 

你可能感兴趣的:(JavaScript)