Gernot Back: DesignMode und Tastenabfrage im iFrame-body-Element

Beitrag lesen

Hallo Cyx23, hallo Felix,

document.getElementById('ziel').document.designMode="on";
document.getElementById('ziel').contentWindow.document.body.onclick=function(){alert(9);};

Das ist seltsam, denn hier steht:

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/designmode.asp?frame=true

"You cannot execute script when the value of the designMode property is set to On."

Ich werde aber noch nicht so ganz schlau, ob sich das bei contenteditable=true ähnlich verhält.

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/contenteditable.asp?frame=true

Gruß Gernot