1、在input输入数据时执行的事件(边输入边触发事件)

$("input[id='subjectNum']").bind('input propertychange', function () {});

 2、关闭浏览器事件

function bindCloseBrowser() {
            document.body.onbeforeunload = function (event) {
                if (isCloseBrowser) {
                    var c = event || window.event;
                    if (/webkit/.test(navigator.userAgent.toLowerCase())) {
                        return "即将离开页面!点击离开将导致数据丢失!";
                    }
                    else {
                        c.returnValue = "即将离开页面!点击离开将导致数据丢失!";
                    }
                }
            }
        }

 

相关文章:

  • 2021-09-20
  • 2021-06-06
  • 2021-07-27
  • 2021-12-05
  • 2021-12-05
  • 2021-06-20
  • 2021-08-09
猜你喜欢
  • 2021-11-25
  • 2021-07-25
  • 2021-11-09
  • 2021-12-23
  • 2021-06-27
  • 2021-12-17
  • 2022-12-23
相关资源
相似解决方案