IEでHTMLElement.prototypeっぽい動作するものを考えているなかで生み出された副産物です。document.styleSheetsのaddRuleとbehavior:expressionをつかってdiv要素のheaderクラスに所属するidをアラートしています。 <html> <head> <style id="behavior"></style> <script> function showElementId(e){ alert(e.id); e.style.behavior = null; }; window.onload = function(){ document.styleSheets.behavior.addRule('div.header','behavior:expression(showElementId(this));'); }; </script>