2012-10-26 65 views
0

我試圖找到什麼改變IE9中屬性的高度/寬度。Firebug lite - 屬性更改中斷 - IE

https://getfirebug.com/wiki/index.php/Break_On_ ...

我已經包括在我的代碼中的螢火蟲,精簡版腳本Firebug的功能「的屬性變化中斷」。在Firebug精簡版的元素 https://getfirebug.com/firebuglite

但右擊並不帶來了不幸的上下文菜單:(

是否Firebug的精簡版支持「的屬性變化中斷」?

還是有一種替代方法?

謝謝,拉斯

+0

你可憐,該死的靈魂。儘管我在這裏承認的次數多,但我寫了一個!重要的;規則只是爲了覆蓋任何惡劣的瀏覽器正在拉動的惡作劇。 –

回答

0

哇噢!!發現瞭如何顯示消息時的屬性茶通過 http://help.dottoro.com/ljdchxcl.php

<body onload="InitListener();"> 
.... 

<script type="text/javascript"> 
    function InitListener() { 
     var elemToCheck = document.getElementById ("objectelementid"); 
     if (elemToCheck.addEventListener) { 
      // all browsers except IE before version 9 
      elemToCheck.addEventListener ('DOMAttrModified', OnAttrModified, false);  
      // Firefox, Opera, IE 
     } 
     if (elemToCheck.attachEvent) { 
      // Internet Explorer and Opera 
      elemToCheck.attachEvent ('onpropertychange', OnAttrModified); 
      // Internet Explorer 
     } 
     console.log("events attached"); 
     // Test the event works 
     elemToCheck.setAttribute("width","333"); 
     console.log("something happened"); 
    } 

    function OnAttrModified (event) { 
     var message = ""; 
     if ('attrChange' in event) {  
      // Firefox, Opera, Internet Explorer from version 9 
      message += "Something has happened to an attribute of the " + 
          event.target.tagName + " element.\n"; 
      message += "The value of the " + event.attrName + 
          " attribute has been changed from " 
         + event.prevValue + " to " + event.newValue + "."; 
     } 

     if ('propertyName' in event) { // Internet Explorer 
      message = "The " + event.propertyName + " property of the " 
         + event.srcElement.tagName + " element has been changed."; 
     } 

     console.log(message); 
    } 
</script> 

nges不幸的是,測試提供徒勞的,似乎如果沒有寬度或高度......必須是功能......深深的喜悅,IE9會自動調整視頻......