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>

 

posted @ 2013-04-21 12:35  daishuguang  阅读(196)  评论(0编辑  收藏  举报