0

このJquery関数で、ブラウズボタンを有効にしたいのですが、できません。ボタンIDはctl00_ContentPlaceHolder1_fupSendNewDocument

    <script language="javascript" type="text/javascript">
    function pageLoad() {
  $(function () {

    /********************************************Open and close model window for File Upload*********************************/

    $('#divAttach').click(
      function () {

        var filedivcount = $('div').filter('#MultiFilelabel1').length;

        var $btn = $('#divAttach');

        var count = ($btn.data("click_count") || 0) + 1;

        $btn.data("click_count", count);

        $("#ctl00_ContentPlaceHolder1_fupSendNewDocument").attr("disabled", false);


        if ($('input').filter('#ctl00_ContentPlaceHolder1_fupSendNewDocument_F1').length > 0) {
          if (count < 3 || filedivcount < 3) {
            document.getElementById('ctl00_ContentPlaceHolder1_fupSendNewDocument_F1').click();
          } else {
            alert('you can upload only 3 files');
          }


        }

        if ($('input').filter('#ctl00_ContentPlaceHolder1_fupSendNewDocument_F4').length > 0) {
          if (count < 3 || filedivcount < 3) {
            document.getElementById('ctl00_ContentPlaceHolder1_fupSendNewDocument_F4').click();
          } else {
            alert('you can upload only 3 files');
          }


        } else {

          if (count < 3 || filedivcount < 3) {
            document.getElementById('ctl00_ContentPlaceHolder1_fupSendNewDocument').click();
          } else {
            alert('you can upload only 3 files');
          }

        }
      }
    );
  });
}
    </script>
4

1 に答える 1