onpropertychange for a textbox in Firefox?

后端 未结 4 1362
借酒劲吻你
借酒劲吻你 2021-01-03 09:47

How to handle the onpropertychange for a textbox in Firefox using JavaScript?

Below is an example:

var headerBGColorTextBox = document.g         


        
4条回答
  •  一向
    一向 (楼主)
    2021-01-03 10:49

    It appears as if the onpropertychange event is IE Specific: http://www.aptana.com/reference/html/api/HTML.event.onpropertychange.html.

    However, with that said, Firefox, at least 3.0.10 does support an event called "DOMAttrModified". The following is a snippet of how it works:

    document.body.addEventListener("DOMAttrModified", function () { console.log ("Args: %o", arguments); }, false);
    document.body.id = "Testing";
    

    Where console.log is the assuming the Firefox extension Firebug is installed.

提交回复
热议问题