zoukankan      html  css  js  c++  java
  • 重置按钮的js写法

    <button type="button" onclick="ClearTextBox()">重置</button>

    <script>
     $("#createDateBegin").datepicker();
     $("#createDateEnd").datepicker();
     
     function ShowProjectDetail(id){
      window.showModalDialog("<s:property value='basePath'/>contacts/orgMgr!showProject?projectId="+id,null,"dialogHeight: 600px; dialogWidth: 800px;center=yes");
     }
     
     function ClearTextBox(){  
      $("#contactId").val("");
      var inputs = document.all.tags("INPUT");  
      for(var i=0; i < inputs.length; i++) {
        if (inputs[i].type == "text") {
        inputs[i].value = ""; }
       if (inputs[i].type == "checkbox") {
        inputs[i].value = null; }  
      }
        
      var inputs = document.all.tags("TEXTAREA");  
      for(var i=0; i < inputs.length; i++)  
      inputs[i].value = "";  
     }
    </script>

    ===============================================================

    $(function() {

     $("#resetBtn").button({icons : {primary : "ui-icon-tag"}});

     $("#resetBtn").click(function(){
      $(':input','#tagForm').not(':button, :submit, :reset').val('').removeAttr('checked').removeAttr('selected');
     });

    });

  • 相关阅读:
    c# GDI+ 绘制矩形圆角
    ActivityManager
    PowerDesigner15 下载 数据库建模工具
    IaaS、PaaS和SaaS
    discuz 社区工具
    c# 字符串比较方法
    android adb 命令大全
    unity
    backtrack5 中文网
    aws
  • 原文地址:https://www.cnblogs.com/guanghuiqq/p/2555199.html
Copyright © 2011-2022 走看看