(function() {
     const forms = document.getElementsByTagName("form");
     if (forms != null && forms.length > 0) {
          var isSubmitBtn = false;
          const f = forms[0];
          const btns = f.getElementsByTagName("button");
          if (btns != null && btns.length > 0) {
               for (var i = 0; i < btns.length; i++){
                    if (btns[i].getAttribute("type") == "submit"){
                         isSubmitBtn = true;
                         btns[i].addEventListener("click", function(e){
                              htmlInterface.log("提交咯: ");
                         });
                    }
               }
          }
          if (!isSubmitBtn){
               f.addEventListener("submit", function(e){
                    htmlInterface.log("提交咯: ");
               });
          }
     }
})()